Skip to content

0003. Money is integer sen

  • Status: Accepted
  • Date: 2026-10-27

Floating-point arithmetic cannot represent most decimal amounts exactly, which causes rounding errors in totals, tax and reports.

All money is stored, computed and transmitted as integer sen (RM12.90 is 1290). No floating point anywhere money is stored, computed or sent. Formatting money for display happens only in the money module of packages/core.

  • Rates (tax, service charge) are applied with integer arithmetic and an explicit rounding rule (half-up to the sen unless a rule says otherwise).
  • API payloads and database columns carry integers, never decimal strings or floats.
  • Code review rejects number arithmetic on money outside the money module.

For AI tools: llms.txt ·llms-full.txtopenkedai.com