Number
Standard 64-bit IEEE 754 floating-point numbers.
Syntax
number = ["-" | "+"] (
decimalNumber
| binaryNumber
| octalNumber
| hexNumber
| scientificNumber
) | specialValue
decimalNumber = digit+ [ "." digit* ] | "." digit+
binaryNumber = "0b" binaryDigit+
octalNumber = "0o" octalDigit+
hexNumber = "0x" hexDigit+
scientificNumber = ( digit+ [ "." digit* ] | "." digit+ ) ("e" | "E") ["-" | "+"] digit+
specialValue = "NaN" | "Inf" | "-Inf" | "+Inf"
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
binaryDigit = "0" | "1"
octalDigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7"
hexDigit = digit | "A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" | "d" | "e" | "f"Structural characters
Symbol
Name
Unicode
Description
Valid forms
Decimal numbers
Alternative bases
Scientific notation
Equivalent forms
Invalid forms
Implementation status (beta)
Preservation of structure
See Also
Last updated
Was this helpful?
