---
title: "Real64"
language: "en"
type: "Compiled Type"
summary: "Real64 represents an IEEE double-precision real atomic type specifier."
canonical_url: "https://reference.wolfram.com/language/ref/compiledtype/Real64.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Compiled Types"
    link: "https://reference.wolfram.com/language/guide/CompiledTypes.en.md"
  - 
    title: "Code Compilation"
    link: "https://reference.wolfram.com/language/guide/CodeCompilation.en.md"
related_tutorials: 
  - 
    title: "Wolfram Compiler Manual"
    link: "https://reference.wolfram.com/language/CompilerManual/tutorial/Overview.en.md"
---
# "Real64" (Compiled Type)

"Real64" represents an IEEE double‐precision real atomic type specifier.

## Details

* ``"Real64"`` can be used in ``Typed`` and related constructs to specify a type.

---

## Properties

* Values held by ``"Real64"`` range from ``-16^^.FFFFFFFFFFFFF8*^256`` to ``16^^.FFFFFFFFFFFFF8*^256``.

## Conversions

From Expressions

* Suitably sized ``Real`` expressions can be converted into compiled elements with the type ``"Real64"``.

To Expressions

* Compiled elements with the type ``"Real64"`` can be converted into ``Real`` expressions.

Arithmetic

* ``"Real64"`` compiled elements are automatically promoted to complex elements when they are combined in binary arithmetic operations.

* ``"Real32"`` compiled elements are automatically promoted to ``"Real64"`` elements when they are combined in binary arithmetic operations.

* Integers are automatically promoted to ``"Real64"`` when they are combined in binary arithmetic operations.

## Runtime Errors

Domain

* ``"Real64"`` can give a runtime error if it is used in an operation that has a restricted input domain.

Overflow

* ``"Real64"`` can give a runtime error if it is used in an operation that overflows.

---

## Examples (4)

### Basic Examples (4)

``"Real64"`` can be used as an input and output from a ``CompiledCodeFunction`` :

```wl
In[1]:= cf = FunctionCompile[Function[Typed[arg, "Real64"], arg]]

Out[1]=
HoldForm[CompiledCodeFunction][Association["Signature" -> TypeSpecifier[{"Real64"} -> "Real64"], 
  "Input" -> Function[Typed[arg, "Real64"], arg], "ErrorFunction" -> Automatic, 
  "orcInstance" -> 140369825142784, "orcModuleId" -> 0, "targetMachineId" -> 140369839546384], 
 5026410472]

In[2]:= cf[ 20.5]

Out[2]= 20.5
```

---

A domain error can take place while running the function. The computation is terminated, a message is issued and the Wolfram Engine is used to compute the result:

```wl
In[1]:=
cf = FunctionCompile[Function[Typed[arg, "Real64"], Sqrt[arg]]];
cf[-100.]
```

CompiledCodeFunction::uncomp: A compiled code runtime error occurred; reverting to uncompiled evaluation: Domain.

```wl
Out[1]= 0.  + 10. I
```

---

An overflow causes an error while running the function. The computation is terminated, a message is issued and the Wolfram Engine is used to compute the result:

```wl
In[1]:=
cf = FunctionCompile[Function[Typed[arg, "Real64"], arg ^ arg]];
cf[2. ^ 10]
```

CompiledCodeFunction::uncomp: A compiled code runtime error occurred; reverting to uncompiled evaluation: FloatingPointInfinite.

```wl
Out[1]= 3.52497141210834706649147016097810684445`12.103464352506053*^3082
```

---

The ``"Real64"`` argument is automatically promoted when combined with a complex number:

```wl
In[1]:=
cf = FunctionCompile[Function[{Typed[arg1, "Integer64"], Typed[arg2, "Complex128"]}, arg1 + arg2]];
Information[cf, "Signature"]

Out[1]= {"Integer64", "Complex128"} -> "Complex128"
```

The ``"Real32"`` argument is automatically promoted when combined with a ``"Real64"`` :

```wl
In[2]:=
cf = FunctionCompile[Function[{Typed[arg1, "Real32"], Typed[arg2, "Real64"]}, arg1 + arg2]];
Information[cf, "Signature"]

Out[2]= {"Real32", "Real64"} -> "Real64"
```

The ``"Integer8"`` argument is automatically promoted when combined with a ``"Real64"`` :

```wl
In[3]:=
cf = FunctionCompile[Function[{Typed[arg1, "Integer8"], Typed[arg2, "Real64"]}, arg1 + arg2]];
Information[cf, "Signature"]

Out[3]= {"Integer8", "Real64"} -> "Real64"
```

## See Also

* [`Real`](https://reference.wolfram.com/language/ref/Real.en.md)
* [`Typed`](https://reference.wolfram.com/language/ref/Typed.en.md)
* [`TypeSpecifier`](https://reference.wolfram.com/language/ref/TypeSpecifier.en.md)
* [`FunctionCompile`](https://reference.wolfram.com/language/ref/FunctionCompile.en.md)
* [`Real32`](https://reference.wolfram.com/language/ref/compiledtype/Real32.en.md)
* [`Integer64`](https://reference.wolfram.com/language/ref/compiledtype/Integer64.en.md)
* [`ComplexReal64`](https://reference.wolfram.com/language/ref/compiledtype/ComplexReal64.en.md)

## Tech Notes

* [Wolfram Compiler Manual](https://reference.wolfram.com/language/CompilerManual/tutorial/Overview.en.md)

## Related Guides

* [Compiled Types](https://reference.wolfram.com/language/guide/CompiledTypes.en.md)
* [Code Compilation](https://reference.wolfram.com/language/guide/CodeCompilation.en.md)

## History

* [Introduced in 2019 (12.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn120.en.md)