Timeline for Is floating point math broken?

Current License: CC BY-SA 4.0

16 events
when toggle format what by license comment
Jan 7 at 14:14 comment added Ronen Festinger It's better than 0.1 + 0.2 != 0.3
Jan 6 at 13:44 comment added President James K. Polk @RonenFestinger: All problems? No, the fundamental problem remains even when storing as decimal floating point, e.g. (1/3) * 3 != 1 in such a format.
Oct 10, 2018 at 22:43 history edited DigitalRoss CC BY-SA 4.0
deleted 62 characters in body
Aug 16, 2018 at 8:45 comment added Ronen Festinger @stephen c you will be able to define the precision you want at the compiler settings. But it will just round the result, like in a calculator.
Feb 5, 2018 at 7:34 comment added Wai Ha Lee Shouldn't "x / (2^n + 5^n)" be "x / (2^n * 5^n)"?
Dec 27, 2017 at 0:08 review Suggested edits
Dec 27, 2017 at 2:04
May 23, 2017 at 12:03 history edited URL Rewriter Bot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Feb 19, 2017 at 19:32 comment added Ronen Festinger I disagree, the floats should be stored as decimals and not binary and all problems are solved.
Dec 9, 2016 at 3:35 comment added Peter Cordes Also, even though floating point is a "legacy" format, it's very well designed. I don't know of anything that anyone would change if re-designing it now. The more I learn about it, the more I think it's really well designed. e.g. the biased exponent means consecutive binary floats have consecutive integer representations, so you can implement nextafter() with an integer increment or decrement on the binary representation of an IEEE float. Also, you can compare floats as integers and get the right answer except when they're both negative (because of sign-magnitude vs. 2's complement).
Dec 9, 2016 at 3:31 comment added Peter Cordes Rounding to the nearest integer isn't a safe way to solve the comparison problem in all cases. 0.4999998 and 0.500001 round to different integers, so there's a "danger zone" around every rounding cut-point. (I know those decimal strings probably aren't exactly representable as IEEE binary floats.)
Jul 20, 2016 at 1:29 history edited DigitalRoss CC BY-SA 3.0
deleted 25 characters in body
Jun 29, 2016 at 16:10 history edited DigitalRoss CC BY-SA 3.0
added 4 characters in body
May 8, 2016 at 18:39 history edited DigitalRoss CC BY-SA 3.0
added 2140 characters in body
May 8, 2016 at 18:29 history edited DigitalRoss CC BY-SA 3.0
added 2140 characters in body
Feb 2, 2016 at 23:56 history edited DigitalRoss CC BY-SA 3.0
added 610 characters in body
Feb 2, 2016 at 23:49 history answered DigitalRoss CC BY-SA 3.0