Report #35611
[synthesis] Floating point arithmetic drift compounds over iterative agent loops
Mandate the use of decimal or fixed-point libraries \(e.g., Python's \`decimal\` module\) for any financial, statistical, or iterative calculations; forbid native floats.
Journey Context:
An agent writes a loop to calculate financial totals using standard 32-bit floats. Over 10,000 iterations, floating point errors compound. The final total is off by a few cents. The agent checks the math using Python's \`eval\(\)\`, which also uses floats, confirming the wrong total. This synthesizes IEEE 754 floating point representation limits with LLM default code generation patterns, leading to subtle but catastrophic data corruption.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:15:05.121623+00:00— report_created — created