"SemanticNumber" (interpreter type)

Number in a standard format or in natural language.

DetailsDetails

Allowed FormsAllowed Forms

  • 1234, -1234, etc.integers
    12.34real numbers
    12.45e45, 1.2E-5, 1.2*^-5numbers in scientific notation
    12,345.67numbers with separators
    1.2`10, 3.4``20numbers with a given Precision or Accuracy
    two, a fifthnumbers in natural language
    3/5, -1/2rational numbers

Restriction SpecificationsRestriction Specifications

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Interpret numbers:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Interpret numbers in natural language:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Restrict in a range:

In[1]:=
Click for copyable input
Out[1]=

Restrict to the first five prime numbers:

In[1]:=
Click for copyable input
Out[1]=

Restrict to odd numbers below 100:

In[1]:=
Click for copyable input
Out[1]=

Set the precision:

In[1]:=
Click for copyable input
Out[1]=

Otherwise, $MachinePrecision is implied:

In[2]:=
Click for copyable input
Out[2]=

When the number contains a Precision or Accuracy, and a precision restriction is also specified, the lower of the two will be applied:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Translate this page: