Always false float comparisons
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Sat May 21 06:45:23 PDT 2016
On 21.05.2016 00:22, Walter Bright wrote:
> On 5/20/2016 5:36 AM, Tobias M wrote:
>> Still an authority, though.
>
> If we're going to use the fallacy of appeal to authority,
Authorities are not always wrong, the fallacy is to argue that they are
right *because* they are authorities. However, in this case, I don't
think you have provided a quote from Kahan that is applicable to the
case we have here. The Gustafson quote is formulated generally enough to
apply to the current case directly.
> may I present
> Kahan who concurrently designed the IEEE 754 spec and the x87.
>
The x87 is by far not the slam-dunk design you seem to make it out to
be. (And you don't need to take my word for it. Otherwise, why would
hardware designers prefer to phase it out in favour of systems that
don't do the implicit extra scratch space thing?)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323
Bug report for this problem in gcc. The discussion raises an issue I
wasn't aware of so far (or have forgotten about): Apparently the x87
does not even round to double correctly, it only rounds the mantissa but
does not deal with out-of-range-exponents correctly. What a mess.
http://blog.jwhitham.org/2015/04/gcc-bug-323-journey-to-heart-of.html
x87 experience report.
http://www.vedetta.com/x87-fpu-php-bug-causes-infinite-loop-affected-websites-vulnerable-to-dos-via-php-get-function-2.2250738585072011e-308
DOS attack possible due to usage of x87 instructions.
http://stackoverflow.com/questions/3206101/extended-80-bit-double-floating-point-in-x87-not-sse2-we-dont-miss-it
Many complaints about x87, and some concerns about 80 bit floating point
support in the future.
http://www.vinc17.org/research/extended.en.html
Good summary of some x87 problems. (Slightly broken English though.)
http://www.realworldtech.com/physx87/
x87 instructions used to make the GPU look faster compared to the CPU.
(Not /directly/ a x87 design problem.)
http://www.cims.nyu.edu/~dbindel/class/cs279/87stack.pdf
http://www.cims.nyu.edu/~dbindel/class/cs279/stack87.pdf
Kahan criticizing the design of the register stack on the x87.
I haven't found any statement from Kahan on gcc bug 323, but this would
be really interesting, if anyone can find anything.
I think there is ample evidence that x87 is ultimately a design failure,
even though the intentions were good and based on real expertise.
More information about the Digitalmars-d
mailing list