Skip to content

Commit d4b8455

Browse files
authored
feat(om2): expand Number description with float64 and NaN details (#2928)
- Add IEEE 754-2008 double-precision reference for float64 - Expand NaN usage to cover all undefined/indeterminate mathematical results Coded with Claude Sonnet 4.6. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
1 parent 61a9107 commit d4b8455

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/specs/om/open_metrics_spec_2_0.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ Metric values in OpenMetrics MUST be either Number or CompositeValue.
130130

131131
##### Number
132132

133-
Number value MUST be either floating point or integer. Note that ingestors of the format MAY only support float64. The non-real values NaN, +Inf and -Inf MUST be supported. NaN value MUST NOT be considered a missing value, but it MAY be used to signal a division by zero.
133+
Number value MUST be either floating point or integer.
134+
135+
Note that ingestors of the format MAY only support float64, for example Go's `float64` which is an IEEE 754-2008 double-precision (binary64) floating-point number with approximately 15–17 significant decimal digits of precision. The non-real values NaN, +Inf and -Inf MUST be supported. NaN value MUST NOT be considered a missing value, but it MAY be used to signal a division by zero or any other mathematical operation that yields an undefined or indeterminate result.
134136

135137
Booleans MUST be represented as a Number value where `1` is true and `0` is false.
136138

0 commit comments

Comments
 (0)