mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-06 18:52:36 +00:00
`num_text` printed every non-integer with twelve fixed decimals. A value with six or more digits before the point then shows the binary noise of the double that holds it: a FormCalc calculate `qty * price` with price 279893.88 gave `279893.880000000005`, and a Sum() of five such amounts gave `1466917.350000000093`. Real invoice forms (USACE ENG Form 93, a dynamic XFA payment estimate) show these in their amount and total fields. Print at most 15 significant digits (the most a double holds for every value) and at most 12 decimals, as before for small values, so sums that should be zero still print 0. Only a fraction loses trailing zeros: past 15 digits before the point no decimals are left and the integer keeps its zeros. Co-authored-by: seanGSISG <seanGSISG@users.noreply.github.com>