3 ms·
Which is why in computational, science, and engineering mathematics there is the concept of maximum precision. All measurements have an amount of precision and
by protonfish 8y ago
Which is why in computational, science, and engineering mathematics there is the concept of maximum precision. All measurements have an amount of precision and as long as the precision of how you record and calculate numbers is greater than that, the solution will be correct.
Unfortunately, this was not what I was taught in math class (science classes had to teach this separately.) This lead me (and most everyone else I communicate with) to erroneously believe that "good" math requires infinite precision. This leads to things like junior programmers losing their minds when 0.1 + 0.2 doesn't equal 0.3
- vanderZwan 8y agoIf you've been following the devlopment of the Unum format[0], you'll know that this comes with a whole set of problems of their own. [0] https://en.wikipedia.org/wiki/Unum_(number_format) https://en.wikipedia.org/wiki/Unum_(number_format)
- pjc50 8y ago> as long as the precision of how you record and calculate numbers is greater than that, the solution will be correct. Well .. not quite, you have to be very aware of the kinds of operations that may result in loss of precision or error accumulation. Whether you're using floating point or longhand decimal. Conversely algebra operates as infinite precision, allowing the safe manipulation of numbers with no finite representation.
- protonfish 8y agoI'd rather do my math with a machine even though it requires finite precision. How operations affect precision is well known and not difficult to keep track of. You will only have "error accumulation," as you call it, if your desired precision is at the maximum that your computational machine can tolerate. So don't do that, and everything will work out fine.
- JadeNB 8y ago> You will only have "error accumulation," as you call it, if your desired precision is at the maximum that your computational machine can tolerate. This is not true. The tiniest of errors can accumulate arbitrarily—this is what it means to say the real numbers form an Archimedean number system; and so it is perfectly possible to get, say, the wrong integer part (a far coarser measure than the maximum precision that any modern machine can tolerate) by performing many successive operations on, say, a float.
- Koshkin 8y agoSometimes even 0.1 is not equal to 0.1.
- PurpleBoxDragon 8y ago>This leads to things like junior programmers losing their minds when 0.1 + 0.2 doesn't equal 0.3 Junior programmers lose their mind when 0.1 + 0.2 != 0.3. Senior programmers lose their mind trying to explain this to the business side.
- yen223 8y agoTruly senior programmers use integers to represent money