3 ms·
> Am I the only person who thinks of IEEE 754 as a completely well-defined data structure Not at all... but I think there are a large number of people who thin
by tomxor 4y ago
> Am I the only person who thinks of IEEE 754 as a completely well-defined data structure
Not at all... but I think there are a large number of people who think they can imagine a better format and yet don't fully understand or appreciate much of the design of IEEE754, and they tend to be quite noisy.
I think the lack of appreciation is ironically due to how damn good a format it is. It manages to hide the myriad deficiencies through such a good balance of compromises that it casts this illusion that perfect fp math is possible in a generalisable enough way. So on the occasions it surfaces the true reality, people assume it must be some kind of defect that is easily addressable with a new format; rather than an intentional decision to maximise correctness and utility by carefully choosing where and how to be incorrect. FP math is the most underestimated areas by programmers IMO, it's just taken for granted so much, which is probably a testament to how well IEEE754 works.
- constantcrying 4y agoYou are absolutely right. So many times I have seen people complain about this or that "flaw" in floating point arithmetic and proposing this or that alternative system. It always makes me question whether they have actually tried using these alternatives... Giving people the illusion that they can work with real numbers on a computer by itself is pretty magical. But the fact that 32bits of data are not enough to hold information about all real numbers and that floats aren't actually real numbers should not be surprising. To me it seems most people don't even understand what floating point numbers are, if you know a little bit all the "weird" behavior starts to make sense and you understand why it has to be that way and how much thought and genius has been put into this datatype.