mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-25 10:39:01 -06:00
write_real printed a whole real below 1e15 as an integer, and a larger one through Display, which has no decimal point either. So 4e9 or 1e30 was written as an integer token outside the range ISO 32000-2 Annex C gives integers (±2^31-1), and read back as Int (or, in readers with 32-bit integers, overflowed). Whole reals now use the integer form only within that range; past it they keep a trailing '.' (§7.3.3 allows "4."). Raised in the review of #2877. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RUNQSPVXx3dDBabRZHAnjz