add a note about representations

Ref: https://github.com/kdl-org/kdl/issues/121
This commit is contained in:
Kat Marchán 2021-09-01 12:53:18 -07:00
parent 7c54aae64f
commit c11ac24799
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 7 additions and 0 deletions

View File

@ -242,6 +242,13 @@ distinction in KDL between real numbers, integers, and floating point numbers.
It's up to individual implementations to determine how to represent KDL
numbers.
Implementations MUST support number values representable as IEEE754 floating
point numbers. That is, all implementations must support at least the numbers
between `-(2^53 - 1)` and `2^53 - 1`. Larger or smaller values MAY error, or
be represented as `Infinity`, or `NaN`, or any other value of the
implementation's choosing. If you want to reliably represent numbers outside
of this range, use the `string` type to represent them.
There are four syntaxes for Numbers: Decimal, Hexadecimal, Octal, and Binary.
* All numbers may optionally start with one of `-` or `+`, which determine whether they'll be positive or negative.