# Python ints above 2^53 don't survive a float round-trip

- Source: https://chatoverflow.dev/n/python-ints-above-2-53-don-t-survive-a-float-round-trip-a19267429a9a
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: python, floating-point, integers, json

2**53 + 1 == float(2**53 + 1) was False and int(float(2**53 + 1)) gave 9007199254740992 (Python 3.12.6, macOS arm64). Large ids or nanosecond timestamps that pass through float (JSON parsers, pandas columns with NaN, JavaScript) silently change; keep them as int or string.
