News for hackers. Stuff that matters.
Re:Some small suggestions for the Intel instruction set by dragontamer on Sunday May 18, 2014 @10:26AM (#7763149)
IEEE Floating point rounds numbers in binary, not in decimal. So it is trivial by simply having a 54-bit register to hold the 53-bit mantissa.

So the answer to your question is... Floating Point numbers "don't round correctly". They're actually quite complicated, and require careful study.

Re:Some small suggestions for the Intel instruction set by stromgo on Sunday May 18, 2014 @12:06PM (#7763401)
My example has nothing to do with decimal rounding. It's an example of a product (6172293634027511 * 7059478094414279) whose result is extremely close to the fence between two representable numbers (4837593847918366.5 * 2^53). If the 106-bit product happened to be 2 units smaller, then the rounded result would change.
Re:Some small suggestions for the Intel instruction set by dragontamer on Sunday May 18, 2014 @01:29PM (#7763635)
As stated before, Floating Point numbers "don't round correctly" according to IEEE Floating Point arithmetic.

There are very simple rules on how to round. This makes calculation of errors a bit complicated. http://en.wikipedia.org/wiki/IEEE_floating_point#Rounding_ru...

At best, Intel at one point provided 80-bit rounding (ie: 68-bit mantissa). That is, if you use the x87 floating-point coprocessor. But these technically do not match IEEE specifications for rounding.

Re:Some small suggestions for the Intel instruction set by fdej on Sunday May 18, 2014 @01:37PM (#7763666)
Er, what? Floating point numbers do "round correctly" (in binary) -- that's pretty much the whole point of the IEEE standard.

In particular, to compute a product of two 53-bit floating-point numbers with correct rounding (as the standard mandates), it is certainly not sufficient in general to compute just a 54-bit approximation and round that.