incorrectly rounded square root

Paul Zimmermann Paul.Zimmermann@inria.fr
Thu Jun 3 11:25:07 GMT 2021


       Dear Marco,

> current Cygwin produces for both i686 and X86_64
> 
>   $ gcc -DNEWLIB -fno-builtin test_sqrt.c  -lm
> 
>   $ ./a.exe
> RNDN: 0x1.ff83fp+63
> RNDZ: 0x1.ff83fp+63
> RNDU: 0x1.ff83fp+63
> RNDD: 0x1.ff83fp+63

make sure you are using the Newlib fenv.h (or print the values of FE_TONEAREST,
FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD). Cf my previous mail.

Paul


More information about the Newlib mailing list