News for hackers. Stuff that matters.
Re:0.30000000000000004 by dragonwriter on Sunday April 02, 2017 @08:57PM (#14019934)
> Your language isn't broken, it's doing floating point math.

Specifically, it's doing binary floating point math, which is an odd choice for decimal literals that's​ common only because very few languages choose correctness and clarity over performance when dealing with numbers, which leads to all kinds of problems with the most obvious approaches to addressing common problem domains in industrially popular languages. If I had a dollar for, well, every dollar of errors I'd seen because binary floating point values were used in a monetary calculation, I could afford to stop having to deal with them.

Re:0.30000000000000004 by Lazare on Sunday April 02, 2017 @09:14PM (#14019994)
"If I had a dime for every time I've seen someone use FLOAT to store currency, I'd have $999.997634"

https://twitter.com/billkarwin/status/347561901460447232