"Integer64" (Compiled Type)

"Integer64"

represents a 64-bit machine integer atomic type specifier.

Details

  • "Integer64" can be used in Typed and related constructs to specify a type.

Properties

  • Values held by "Integer64" range from -263-1 to 263-1.

Conversions

    From Expressions

  • Suitably sized Integer expressions can be converted into compiled code elements with the type "Integer64".
  • To Expressions

  • "Integer64" compiled elements can be converted into Integer expressions.
  • Arithmetic

  • "Integer64" compiled elements are automatically promoted to real or complex elements when they are combined in binary arithmetic operations.
  • Compiled elements with types smaller than "Integer64" are automatically promoted to "Integer64" when they are combined in binary arithmetic operations.
  • "Integer64" compiled elements are automatically promoted to "UnsignedInteger64" elements when they are combined in binary arithmetic operations.

Run-Time Errors

    Overflow

  • "Integer64" can give a runtime error if it is used in an operation that overflows.

Examples

Basic Examples  (3)

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

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

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:

In[1]:=
Click for copyable input
Out[1]=

The "Integer64" argument is automatically promoted when combined with a real number:

In[1]:=
Click for copyable input
Out[1]=

When an "Integer64" argument is combined with an integer of a smaller storage size, the smaller type is automatically promoted:

In[2]:=
Click for copyable input
Out[2]=

The "Integer64" argument is automatically promoted when combined with an unsigned integer of the same storage size:

In[3]:=
Click for copyable input
Out[3]=