Timeline for Solutions for floating point rounding errors
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 25, 2016 at 14:03 | comment | added | jk. | some of your terminology is a bit iffy - floating fixed point makes no sense - I think you are trying to say floating decimal. | |
| Feb 21, 2016 at 23:16 | comment | added | Brendan | @MichaelT: For addition of rational numbers you don't need to find the LCM and it's faster not to (and faster to cancel "LSB zeros" after, and only ever fully simplify when absolutely necessary). For rational numbers in general it's typically just "numerator/denominator" alone, or "numerator/denominator << exponent" (and not "whole part + numerator/denominator"). Also your "floating fixed point" is a floating point representation, and would be better described as "arbitrary size floating point" (to distinguish it from "fixed size floating point"). | |
| Jun 26, 2013 at 18:52 | comment | added | user40980 | @Caleb for irrationals one would need to evaluate them to beyond where any rounding could cause problems. For example, 22/7 is accurate to 0.1% of pi, 355/113 is accurate to 10^-8. If you are only working with numbers to 3 decimal places, having 3.141592653 should avoid any rounding errors at 3 decimal places. | |
| Jun 26, 2013 at 18:44 | comment | added | Caleb | That's a good start, but of course it doesn't completely solve the rounding problem. Irrational numbers like π, e and √2 don't have a strictly numeric representation; you need to represent them symbolically if you want an exact representation, or evaluate them as late as possible if you just want to minimize the rounding error. | |
| Jun 26, 2013 at 18:38 | vote | accept | JNL | ||
| Jun 26, 2013 at 18:38 | vote | accept | JNL | ||
| Jun 26, 2013 at 18:38 | |||||
| Jun 26, 2013 at 18:30 | history | answered | user40980 | CC BY-SA 3.0 |