Big App Energy

Currency Math and Round Errors


Listen Later

In this episode, Ben and Jacob discuss the importance of handling currency properly when dealing with money in apps. While it may seem straightforward, currency math involves a lot of complexity, and rounding errors can occur if not handled correctly. They discuss how these errors can lead to significant losses, as seen in the Vancouver stock exchange and the infamous "salami slicing" technique used to steal fractions of a cent in bank transactions.

To avoid these issues, Ben and Jacob provide some tips for handling currency math in programming, such as using a decimal data type, carefully selecting rounding methods, avoiding intermediate rounding, using integer arithmetic, and using well-tested libraries. By following these guidelines, app developers can ensure accurate calculation results and prevent potential losses due to rounding errors. Tune in to learn more about the importance of currency math in app development.

...more
View all episodesView all episodes
Download on the App Store

Big App EnergyBy Hired Gun Apps