ROUND() changes a representable integer
Author: adoublebCreated Sep 24, 2026Updated Sep 30, 2026
Version: ArangoDB 3.12.11 (official arangodb:3.12.11 image, 2026-09-15).
Repro
RETURN ROUND(4503599627370496) -> [4503599627370496] (correct)
RETURN ROUND(4503599627370497) -> [4503599627370498] (wrong)
RETURN ROUND(4503599627370498) -> [4503599627370498] (correct)Why it is a bug
4503599627370497 is 2^52 + 1. It is exactly representable in IEEE-754 binary64, so this is not a case where the input integer has already been rounded during conversion to a double.
The value is already an integer, so applying ROUND() should not change it. Instead, ROUND() changes it by +1.
Source: arangodb/arangodb