3 ms·
I read the article so you don't have to! The author dreams of consistent behavior so he can get: - Reproducible results across platforms - Reproducible result
by idlewords 12y ago
I read the article so you don't have to! The author dreams of consistent behavior so he can get:
- Reproducible results across platforms
- Reproducible results with different build settings (such as debug builds or optimization levels)
- Useful test cases for regression testing
- Test cases that help him find misbehavior in the optimizer
- An improved chance of finding more subtle bugs, absent 'noise' from small changes in floating point operations
In particular, he gives examples of how changes to nearby code can change the output of floating point operations, due to hairiness in how registers are allocated. You can see how this would make testing quite painful.
These all seem like worthy goals that deserve a better response than "you're doing it wrong", along with some non-sequitur about race conditions.
- markrages 12y agoRegarding race conditions, I was referring to this: > It's not just floating point that's inconsistent across modes – it's code snippets with behavior undefined by the language, buggy dependence on timing, optimizer bugs, conditional compilation, etc.