22
Wisecrack
206d

# What grinds my gears: IEEE-754 This, to me, seems retarded. Take the value 0.931 for example. Its represented in binary as 00111111011011100101011000000100 See those last three bits? Well, it causes it to come out in decimal like so: 0.93099999~ Which because bankers rounding is nowstandard, that actually works out to 0.930, because with bankers rounding, we round to the nearest even number? Makes sense? No. Anyone asked for it? No (well maybe the banks). Was it even necessary? Fuck no. But did we get it anyway? Yes. And worse, thats not even the most accurate way to represent our value of 0.931 owing to how fucked up rounding now is becaue everything has to be pure shit these days. A better representation would be 00111101101111101010101100110111 <- good 00111111011011100101011000000100 < - shit The new representation works out to 0.093100004 or 0.093100003898143768310546875 when represented internally. Whats this mean? Because of rounding you don't lose accuracy anymore. Am I mistaken, or is IEEE-754 shit?

• 4
John D. Cook has a series on this.
https://johndcook.com/blog/2009/...
• 4
I'm a bit confused: round-to-even is what happens when the result is exactly midway between two possible representations.

If something gives you 0.931, the first representation is closer. What am I missing?
• 0
Bankers rounding would not do that
• 0
@frankot

I'm griping against the result when bankers rounding is combined with the IEEE standard.
• 0
@kurast

How so?