diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-10-13 13:12:46 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-10-13 13:12:46 +0000 |
commit | ddced954161fb2d2040efd9d2656822a24059261 (patch) | |
tree | c51fc46bd8eb412dcc8e5693f9a1087651374d53 | |
parent | 2e8a6a2e1fd67700c79c4bbe8b9ab7d5ebd9e5bf (diff) | |
download | mpfr-ddced954161fb2d2040efd9d2656822a24059261.tar.gz |
added section "Problems due to compiler bugs"
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2489 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | BUGS | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -52,3 +52,26 @@ Potential bugs: * mpfr_hypot may fail for x very large, y very small and a very large target precision. Other functions may be affected by similar problems. + +Problems due to compiler bugs: + +* on some architectures (for example alpha-dec-osf), gcc 3.3 wrongly + compares "long double" floating-point numbers, with optimization level + 1 or higher. This bug can be detected by the following program: + + #include <stdio.h> + #include <stdlib.h> + #include <float.h> + int + main () + { + long double d; + d = 1.0; while (d < LDBL_MAX / 2.0) d += d; + if (d == (long double) 0.0) + printf ("d equals 0.0\n"); + } + + This results in a problem in the mpfr_set_ld function. A workaround is + to compile set_ld.c with -O0 (no optimization). + + |