"Complex128" (Compiled Type)
"Complex128"
represents a complex number with IEEE double‐precision 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.
Conversions
- Suitably sized Complex expressions with real and imaginary parts that are Real can be converted into compiled elements with the type "Complex128".
- Compiled elements with the type "Complex128" can be converted into Complex expressions with Real real and imaginary parts.
- Integers and reals are automatically promoted to "Complex128" elements when they are combined in binary arithmetic operations.
From Expressions
To Expressions
Arithmetic
Examples
Basic Examples (2)Summary of the most common use cases
"Complex128" can be used as an input and output from a CompiledCodeFunction:
In[1]:=1

✖
https://wolfram.com/xid/0ipd90w22ns2ymyhz5gdns5rymm-ck3oom
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0ipd90w22ns2ymyhz5gdns5rymm-oe1o2j
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:
In[1]:=1

✖
https://wolfram.com/xid/0ipd90w22ns2ymyhz5gdns5rymm-q0ndn0

Out[1]=1
