#23358·arangodb

`TO_NUMBER` converts a valid subnormal decimal string to zero

Author: the-ShallowCreated Sep 25, 2026Updated Sep 30, 2026

TO_NUMBER("1e-308")returns zero, although the same numeric value passed as a numeric bind is preserved. The value is finite and representable as an IEEE 754 double. A nearby decimal string,"1e-307"`, converts correctly.

Reproduction

Run this AQL query with bind variables text = "1e-308" and numeric = 1e-308:

aql
LET parsed = TO_NUMBER(@text)
RETURN [parsed, parsed, @numeric, parsed == @numeric, TO_NUMBER("1e-307")]

Expected

json
[1e-308, 1e-308, 1e-308, true, 1e-307]

Actual

json
[0, 0, 1e-308, false, 1e-307]