# Double

A finite double precision IEEE 754 floating point number.

## [](#_define_a_double_attribute_type)Define a double attribute type

```typeql
#!test[schema]
define
attribute latitude @independent, value double;
attribute longitude @independent, value double;
```

## [](#_insert_data_that_has_a_double_attribute)Insert data that has a double attribute

```typeql
#!test[schema]
#{{
define
  entity landmark, owns latitude, owns longitude;
#}}
#!test[write]
insert
  $l isa landmark, has latitude 11.373333, has longitude 142.591667;
```

## [](#_insert_a_standalone_double_attribute)Insert a standalone double attribute

```typeql
#!test[write]
insert
  $_ isa latitude 11.373333;
  $_ isa longitude 142.591667;
```

## [](#_specify_valid_values_for_a_double_attribute_type)Specify valid values for a double attribute type

```typeql
#!test[schema]
define
  attribute zoom-factor value double @values(0.5, 1.0, 2.0, 4.0);
```

## [](#_specify_valid_values_for_owning_a_double_attribute_type)Specify valid values for owning a double attribute type

```typeql
#!test[schema]
define
  entity map-view owns zoom-factor @values(1.0, 2.0);
```

## [](#_specify_range_of_valid_values_for_a_double_attribute_type)Specify range of valid values for a double attribute type

```typeql
#!test[schema]
define
  attribute elevation value double @range(-500.0..9000.0);
```

## [](#_specify_range_of_valid_values_for_owning_a_double_attribute_type)Specify range of valid values for owning a double attribute type

```typeql
#!test[schema]
define
  entity mountain owns elevation @range(0.0..9000.0);
```

## [](#_retrieve_data_by_double_attribute)Retrieve data by double attribute

```typeql
#!test[read]
match
  $l isa landmark, has latitude 11.373333;
```

[Integer](../integer/index.md) [Decimal](../decimal/index.md)

[Edit on GitHub](https://github.com/typedb/typedb-docs/edit/3.x-development/typeql-reference/modules/ROOT/pages/value-types/double.adoc) Edit this page on GitHub.