From c11ac247992b6f29ad94c9c6d3d8aafa1d040366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Wed, 1 Sep 2021 12:53:18 -0700 Subject: [PATCH] add a note about representations Ref: https://github.com/kdl-org/kdl/issues/121 --- SPEC.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SPEC.md b/SPEC.md index cfb65cf..c26f7be 100644 --- a/SPEC.md +++ b/SPEC.md @@ -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.