WOLFRAM

"Complex128"

represents a complex number with IEEE doubleprecision real and imaginary parts atomic type specifier.

Details

  • "Complex128" can be used in Typed and related constructs to specify a type.
  • "ComplexReal64" and "Complex128" describe the same type.

Properties

  • The real and imaginary values held by "Complex128" range from -16^^.FFFFFFFFFFFFF8*^256 to 16^^.FFFFFFFFFFFFF8*^256.

Conversions

    From Expressions

  • Suitably sized Complex expressions with real and imaginary parts that are Real can be converted into compiled elements with the type "Complex128".
  • To Expressions

  • Compiled elements with the type "Complex128" can be converted into Complex expressions with Real real and imaginary parts.
  • Arithmetic

  • Integers and reals are automatically promoted to "Complex128" elements when they are combined in binary arithmetic operations.

Runtime Errors

    Overflow

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

Examples

Basic Examples  (2)Summary of the most common use cases

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

Out[1]=1
Out[2]=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:

Out[1]=1