OpenersNotesSection(Spacer1)Details

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Interpret complex numbers:

Interpreter["SemanticComplexNumber"][".5i"]

Interpreter["SemanticComplexNumber"]["1+i"]

Interpret complex numbers in natural language:

Interpreter["SemanticComplexNumber"]["two + i"]

Interpreter["SemanticComplexNumber"]["minus i"]

Computations are not allowed:

Interpreter["SemanticComplexNumber"]["sqrt -1"]

Set the precision:

Interpreter[Restricted["SemanticComplexNumber",Automatic,3]]["1.23456 I + 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[SemanticImport, paclet:ref/SemanticImport])  ▪  (RefLink[Restricted, paclet:ref/Restricted])  ▪  (RefLink[Failure, paclet:ref/Failure])  ▪  (RefLink[Complex, paclet:ref/Complex])}, {Related Interpreter Types:  (RefLink[ComplexNumber, paclet:ref/interpreter/ComplexNumber])  ▪  (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])}})}})