Havoc's Blog

this blog contains blog posts

More Floating Point Fun

Miguel, I’m not sure interested is the right word in the context of that 94-page document. 😉 For years here is my mental model of floating point: To test numeric equality don’t use the == operator If I ever write any numeric code, learn a lot more So recently I changed Havoc’s Floating Point Fact […]

Floating Point Fun

Elijah, I think you may be even more screwed than you think. I recently went through some pain because I assumed that “a == b” would do a bitwise comparison of two doubles a and b. It turns out that this isn’t true, and I bet that even if the compiler doesn’t drop the i […]