OpenersNotesSection(Spacer1)Details

OpenersPrimaryExamplesSection(Spacer1)Examples  (5)

OpenersExampleSection0(Spacer1)Basic Examples  (5)

Interpret complex numbers:

Interpreter["ComplexNumber"]["3I"]

Interpreter["ComplexNumber"]["-.5i+4"]

Use the options to customize the number format:

Interpreter["ComplexNumber",NumberSigns->{"n","p"}]["nI p15"]

Interpreter["ComplexNumber",NumberSeparator->"#"]["10#000i"]

Interpreter["ComplexNumber",NumberPoint->","]["1+7,3i"]

Restrict the result to the unit circle:

Interpreter[Restricted["ComplexNumber", Circle[]]][" -i"]

Interpreter[Restricted["ComplexNumber", Circle[]]]["1 - i"]

Restrict the result to any region of the complex plane:

Interpreter[Restricted["ComplexNumber", ImplicitRegion[(x^2)+(y^2)≤1,{x,y}]]][" -i"]

Interpreter[Restricted["ComplexNumber", InfiniteLine[{0,0},{1,-1}]]][".4 - i .4"]

Set the precision:

Interpreter[Restricted["ComplexNumber",Automatic,3]]["1.23456i+4.56789"]

Otherwise, (RefLink[$MachinePrecision, paclet:ref/$MachinePrecision]) is implied:

Interpreter["ComplexNumber"]["1.23456i"]//Precision

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Interpreter, paclet:ref/Interpreter])  ▪  (RefLink[Restricted, paclet:ref/Restricted])  ▪  (RefLink[Failure, paclet:ref/Failure])  ▪  (RefLink[Complex, paclet:ref/Complex])}, {Related Interpreter Types:  (RefLink[SemanticComplexNumber, paclet:ref/interpreter/SemanticComplexNumber])  ▪  (RefLink[ComputedComplexNumber, paclet:ref/interpreter/ComputedComplexNumber])  ▪  (RefLink[Number, paclet:ref/interpreter/Number])  ▪  (RefLink[Integer, paclet:ref/interpreter/Integer])  ▪  (RefLink[Real, paclet:ref/interpreter/Real])  ▪  (RefLink[OrdinalNumber, paclet:ref/interpreter/OrdinalNumber])  ▪  (RefLink[SemanticNumber, paclet:ref/interpreter/SemanticNumber])  ▪  (RefLink[ComputedNumber, paclet:ref/interpreter/ComputedNumber])  ▪  (RefLink[SemanticInteger, paclet:ref/interpreter/SemanticInteger])  ▪  (RefLink[ComputedInteger, paclet:ref/interpreter/ComputedInteger])  ▪  (RefLink[SemanticReal, paclet:ref/interpreter/SemanticReal])  ▪  (RefLink[ComputedReal, paclet:ref/interpreter/ComputedReal])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Setting Up Input Interpreters, paclet:guide/InterpretingStrings])}})}})