20 points · by delan · 11y ago · 8 comments
Edit: I had misremembered one of the differences. Javascript does get division by zero correct. The biggest differences are in the comparisons, Javascript propagates NaNs more frequently.
They were more experienced, convinced me I was being pedantic, and I myself wasn't coding on that project anyway. Months later, we had to do a panic refactor as real-world usage immediately made the app fall over.
These are the kinds of bugs I discovered as a kid writing crappy computer games for my friends and I: "floats for everyone! This is way easier!", followed later with: "floats are slow, and I don't understand half my bugs!".
Actually, on this project I found myself explaining several things I'd learnt from recreational games programming. Things that you apparently don't learn in CS (I did EE, so I wouldn't know), or a decade of doing the J2EE business middleware dance.
One of the instantly recognisable symptoms of float-abuse is NaNs appearing in odd places:
https://what.thedailywtf.com/t/i-dont-look-forward-to-having...