Code 85
Published in

Code 85

How To Stop Floating Point Arithmetic Errors in Python

Learn to use the Decimal library

We expect precision, consistency, and accuracy when we code. After all, it’s a computer doing the work. But your arithmetic may have been off the entire time and you didn’t even know.

If you’ve experienced floating point arithmetic errors, then you know what we’re talking about. If you’re…

--

--

Plain language programming tutorials for non-developers

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store