What Every Programmer Should Know About Floating-Point Arithmetic
A simple and to-the-point guide to floating point arithmetic and the crazy but genius IEEE-754 standard:
Well, this site is here to:
- Explain concisely why you get that unexpected result
- Tell you how to deal with this problem
- If you’re interested, provide in-depth explanations of why floating-point numbers have to work like that and what other problems can arise
The book is also on github.