"Real" (Interpreter Type)
Real number in a standard format.
Details
- "Real" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "Real" does not require connectivity to the Wolfram Cloud.
Restriction Specifications
-
Restricted["Real",{{choices1,…}}] one among choices Restricted["Real",max] a real below max Restricted["Real",{min,max}] a real between min and max Restricted["Real",{min,max,s}] a real between min and max, with step s Restricted["Real", Automatic, n] a real with n-digit precision
Options
- The following options can be used:
-
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
Examples
Basic Examples (3)Summary of the most common use cases
In[1]:=1

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

In[2]:=2

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

In[1]:=1

✖
https://wolfram.com/xid/0yk7r3ty6vyeaty8rf-2df5dt
Out[1]=1

In[1]:=1

✖
https://wolfram.com/xid/0yk7r3ty6vyeaty8rf-f2417z
Out[1]=1

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

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

Use a different number point and/or block separator:
In[1]:=1

✖
https://wolfram.com/xid/0yk7r3ty6vyeaty8rf-shf6uk
Out[1]=1

In[1]:=1

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

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

✖
https://wolfram.com/xid/0yk7r3ty6vyeaty8rf-im4lu3
Out[2]=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]:=1

✖
https://wolfram.com/xid/0yk7r3ty6vyeaty8rf-rckk1i
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0yk7r3ty6vyeaty8rf-qohe8n
Out[2]=2
