"ComplexNumber" (Interpreter Type)
Complex number in a standard format.
Details
- "ComplexNumber" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "ComplexNumber" does not require connectivity to the Wolfram Cloud.
Allowed Forms
- The real and imaginary parts can be in the number formats allowed by "Number".
Restriction Specifications
-
Restricted["ComplexNumber",{{choice1,…}}] one among choices Restricted["ComplexNumber",region] a complex number within a region of the complex plane Restricted["ComplexNumber",Automatic,n] a complex number with n-digit precision
Options
- The following options can be used for the real and imaginary parts:
-
DigitBlock Infinity number of digits between breaks NumberPoint "." decimal point string NumberSeparator {",",""} string to insert at breaks between blocks NumberSigns {"-",""} strings to use for signs of negative and positive numbers
Interpretation
- "ComplexNumber" yields a Complex.
Examples
Basic Examples (5)Summary of the most common use cases
In[1]:=1

✖
https://wolfram.com/xid/0b6j82pxnl0ubho5ws34oy-rae2nv
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0b6j82pxnl0ubho5ws34oy-p83p1r
Out[2]=2

Use the options to customize the number format:
In[1]:=1

✖
https://wolfram.com/xid/0b6j82pxnl0ubho5ws34oy-q2ms2s
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0b6j82pxnl0ubho5ws34oy-e3vecc
Out[2]=2

In[3]:=3

✖
https://wolfram.com/xid/0b6j82pxnl0ubho5ws34oy-ictctf
Out[3]=3

Restrict the result to the unit circle:
In[1]:=1

✖
https://wolfram.com/xid/0b6j82pxnl0ubho5ws34oy-5u1zjo
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0b6j82pxnl0ubho5ws34oy-fnngub
Out[2]=2

Restrict the result to any region of the complex plane:
In[1]:=1

✖
https://wolfram.com/xid/0b6j82pxnl0ubho5ws34oy-oo7xhf
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0b6j82pxnl0ubho5ws34oy-5p3t1b
Out[2]=2

In[1]:=1

✖
https://wolfram.com/xid/0b6j82pxnl0ubho5ws34oy-i7ppzr
Out[1]=1

Otherwise, $MachinePrecision is implied:
In[2]:=2

✖
https://wolfram.com/xid/0b6j82pxnl0ubho5ws34oy-tpungo
Out[2]=2
