------- Comment #4 from fxcoudert at gcc dot gnu dot org  2006-05-30 15:05 
-------
OK, I managed to reduce this to a GMP/MPFR bug on i386-pc-mingw32:

$ cat mpfr.c 
#include <stdio.h>
#include <gmp.h>
#include <mpfr.h>

int main (void)
{
  mpfr_t b;

  mpfr_init (b);
  mpfr_set_ui (b, 2, GMP_RNDN);
  mpfr_out_str (stdout, 10, 0, b, GMP_RNDN);
  fputs ("\n", stdout);
  mpfr_pow_si (b, b, -23, GMP_RNDN);
  mpfr_out_str (stdout, 10, 0, b, GMP_RNDN);
  fputs ("\n", stdout);
  return 0;
}
$ gcc mpfr.c -I$HOME/local/include -L$HOME/local/lib -lmpfr -lgmp && ./a.exe 
2.0000000000000000
0

while it should output (on i386-pc-linux):

$ gcc mpfr.c -lmpfr -lgmp && ./a.out
2.00000000000000
1.19209289550781e-7


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27561

Reply via email to