Kahan's Floating Point Test

Sylvain Pion Sylvain.Pion@sophia.inria.fr
Thu May 31 00:01:00 GMT 2001


Talking about this, I usually do a manual flush to memory in order to have
correct rounding when I need it, I use something like the following :

inline double force_to_mem (double x)
{
  asm("" : "=m"(x) : "m"(x));
  return x;
}

Unfortunately, this code doesn't work for C++ with GCC 3.0 on x86.
(PR c++/2115, still not analyzed...  hint, hint :)

And I have no other idea how to do this reliably for GCC 3...

-- 
Sylvain



More information about the Gcc mailing list