mirror of
https://github.com/kenhuangus/wikiskill
synced 2026-09-22 23:34:25 +08:00
202 B
202 B
Pattern: Rounding errors
Description
Demo pattern: naive rounding gives wrong answers.
Root cause
Skipping the final rounding step.
Workaround
Always round the final result to 2 decimals.