"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)
Interpreter["Real"]["3.2e5"]Interpreter["Real"]["-2."]Interpreter[Restricted["Real", {0, Pi}]][{"3.14", "3.15"}]Interpreter[Restricted["Real", Automatic, 3]]["3.1415926535897932384"]Otherwise, $MachinePrecision is implied:
Interpreter["Real"]["3.1415926535897932384"]Use a different number point and/or block separator:
Interpreter["Real", NumberPoint -> ",", NumberSeparator -> "."]["1.002,34"]Interpreter[Restricted["Real", Automatic, 3]]["1.09276"]Otherwise, $MachinePrecision is implied:
Interpreter["Real"]["1.09276"]//PrecisionWhen the number contains a Precision or Accuracy, and a precision restriction is also specified, the lower of the two will be applied:
Interpreter[Restricted["Real", Automatic, 10]]["1.23456789`3"]Interpreter[Restricted["Real", Automatic, 2]]["1.23456789``10"]Related Guides
History
Introduced in 2015 (10.1)