Money Arithmetic And Rounding Pitfalls

Use when code stores, adds, splits, converts or displays amounts of money: integer minor units or exact decimals with an explicit currency, the exponent coming from the maintained ISO 4217 list (zero-, two- and three-decimal currencies), choosing a ledger scale once, calculating on integers, rejecting invalid amounts, largest-remainder splitting, a named rounding policy, currency exchange through paired transfers, overflow and the wire format.

techmefr Updated

File contents

techmefr/mentis commit 13028ac80d

Frequently asked questions

npx get-skill add techmefr/money-arithmetic-and-rounding-pitfalls