#13974·neo4j

round() returns 9.223372036854776E18 (2^63) for any FLOAT with |value| ≥ 2^63

Author: hkjiang26Created Sep 11, 2026Updated Sep 11, 2026
Labelsbugteam-cypherGithub Issue

Neo4j Version: 2026.07.1

Installation Method: Docker

API: Cypher (Bolt / cypher-shell)

Steps to reproduce

  1. On a fresh database, run:
cypher
RETURN round(1.0E308) AS r1,
       round(1.0E19) AS r2,
       round(9.3E18) AS r3,
       round(-1.0E308) AS r4,
       round(1.0E308, 0) AS r5,
       round(1.0E308, 0, 'HALF_UP') AS r6,
       round(1.0E308) = round(1.0E308, 0, 'HALF_UP') AS r7

Expected behavior

  • round(1.0E308)1.0E308
  • round(1.0E19)1.0E19
  • round(9.3E18)9.3E18
  • round(-1.0E308)-1.0E308
  • round(1.0E308, 0)1.0E308
  • round(1.0E308) = round(1.0E308, 0, 'HALF_UP')true (they are the same logical operation; round(1.0E308, 0, 'HALF_UP') already returns 1.0E308 correctly)

Actual behavior

  • round(1.0E308)9.223372036854776E18 (off by ~290 orders of magnitude)
  • round(1.0E19)9.223372036854776E18
  • round(9.3E18)9.223372036854776E18
  • round(-1.0E308)-9.223372036854776E18
  • round(1.0E308, 0)9.223372036854776E18
  • round(9.2E18)9.2E18 (correct — below the 2^63 threshold)
  • round(1.0E19, 1) / round(1.0E19, 0, 'HALF_UP') / round(1.0E19, 1, 'HALF_UP') → correct (1.0E19)
  • round(1.0E308) = round(1.0E308, 0, 'HALF_UP')false

For comparison, the same input 1.0E308 is handled correctly by every other rounding function and by every explicit-mode overload of round():

Expression Result
ceil(1.0E308) 1.0E308
floor(1.0E308) 1.0E308
round(1.0E308, 0, 'UP') 1.0E308
round(1.0E308, 0, 'DOWN') 1.0E308
round(1.0E308, 0, 'HALF_UP') 1.0E308