3 ms·
> the other just gives you a (more) wrong number. This is a common misconception: IEEE754 floating point arithmetic is not wrong or fuzzy or inherently inexact
by mbauman 5y ago
> the other just gives you a (more) wrong number.
This is a common misconception: IEEE754 floating point arithmetic is not wrong or fuzzy or inherently inexact. It is very exact; it just has limited precision.
- chmod775 5y agoNo. In mathematical terms typical floating point arithmetic has perfect precision - it is repeatable - but limited accuracy - it can deviate from the real value. It's a shortcoming of CS vocabulary that "precision" is also used to refer to the number of bits used. "Exactness" is a fuzzy term used in common english to refer to the concept of both precision and accuracy, or either really. It's not really used in mathematics.
- mbauman 5y agoOh cool, you want to use different definitions. No matter. Point remains: the floating point representation of 1/4 is not approximate. Similarly, the closest floating point value to 1/10 also precisely defines some value: it's exactly 0.1000000000000000055511151231257827021181583404541015625. Now whether that's accurate to you depends upon your application. But the numbers don't care.
- chmod775 5y ago> Oh cool, you want to use different definitions. No matter. It's not "different" terminology. It's the correct terminology. Which you should have down if you want to wisecrack at people. You really just took a dozen words that were referring to the result of a calculation being wrong (as opposed to the real result) out of context to make them about floating point numbers in a vacuum. Then after construing some new context, you tried to correct the straw man by giving an explanation in which you used pretty much all the terminology incorrectly. Don't be surprised people come back at you in the same tone of voice if you leave an opening wide as a barn door. I assume both of us are capable of constructing sentences using only precise mathematical language. This is not the place or time to flaunt that ability and correct others on things that are still perfectly understandable. We're not writing a paper.
- mbauman 5y agoThe point is simply there’s a method to the madness. It’s not randomly inaccurate. Many operations are perfectly accurate. Those that aren’t are just the closest representable value to the accurate value. Doing something like what you initially suggested would break that.