Standard 64-bit floating-point numbers in Internet Object
A Number in Internet Object represents a 64-bit double-precision floating-point value conforming to the IEEE 754 standard. Numbers are scalar primitives used to express integers, fractional values, and special numeric constants.
Numbers in Internet Object support various representations including different bases (binary, octal, hexadecimal), scientific notation, and special values like NaN and Infinity.
Numbers in decimal format can include integers and fractional values, with optional sign prefixes:
A decimal number consists of one or more digits, optionally preceded by a sign (+ or -), and optionally including a decimal point followed by one or more digits.
Alternative Bases
Numbers can be expressed in binary, octal, or hexadecimal notation:
Binary Numbers (Base-2)
Binary representation uses 0b or 0B prefix followed by binary digits (0-1):
Octal Numbers (Base-8)
Octal representation uses 0o or 0O prefix followed by octal digits (0-7):
Hexadecimal Numbers (Base-16)
Hexadecimal representation uses 0x or 0X prefix followed by hex digits (0-9, A-F):
Case Sensitivity
Prefixes: Both lowercase (0b, 0o, 0x) and uppercase (0B, 0O, 0X) are supported
Hex digits: Both uppercase (A-F) and lowercase (a-f) are valid
Scientific Notation
Scientific notation expresses numbers using exponential form with e or E:
Scientific Notation Components
Mantissa: The significant digits (before e/E)
Exponent marker: e or E (case insensitive)
Exponent: The power of 10 (can be positive, negative, or zero)
Optional Behaviors
Literal and Alternate Forms
Numbers support multiple equivalent representations:
Invalid Forms
Preservation of Structure
Internet Object preserves:
The chosen representation form (decimal, binary, octal, hex, scientific)
Whitespace (non-significant in interpretation)
Syntactic fidelity (as written, except that an explicit plus sign is not preserved)
However, it does not interpret:
Mathematical relationships between values
Precision requirements beyond IEEE 754
Domain-specific numeric constraints
Such semantics are the responsibility of the schema layer, validators, or application logic.