Bug Report GMP-5.1.1 Mini-gmp t-double.c

Torbjorn Granlund tg at gmplib.org
Mon Feb 25 17:30:09 CET 2013

nisse at lysator.liu.se (Niels Möller) writes:

  Torbjorn Granlund <tg at gmplib.org> writes:
  > I suppose it could also be triggered on an x86 host, in 32-bit mode and
  > passing some flag like -march=i486 to make sure sse remain unused.
  I could reproduce it with CC='gcc -m32' on my x86_64 laptop. Just pushed
  in the volatile fix.
Alas, I did not manage to cause any failure on tambo (an athlon32).

Did you somehow pass -O?

  Even if I don't really know how x86 floating point works.

Lucky you.

Old x86 used an 8 value stack of 80-bit quantities, and with all
operations using a 64-bit mantissa.  Loads converted from float or
double to the 80-bit format, and store converted back.  Only when SSE2
came along did the stack-based FP become obsolete, and with that did x86
get full IEEE complience (i.e., no double rounding).


More information about the gmp-bugs mailing list