0.30000000000000004.com

LOL. So, errors with floating point math in programming languages are such a common question that someone built an excellent website–0.30000000000000004.com–to explain this to folks.

The title refers to the fact that .1 + .2 will frequently be represented as 0.30000000000000004 because of how floating point systems represent repeating decimals.

The site includes language-by-language examples of how simple operations such as .1 + .2 are handled by popular programming languages.

Leave a Reply