summaryrefslogtreecommitdiff
path: root/BUGS
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2003-10-13 13:12:46 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2003-10-13 13:12:46 +0000
commitddced954161fb2d2040efd9d2656822a24059261 (patch)
treec51fc46bd8eb412dcc8e5693f9a1087651374d53 /BUGS
parent2e8a6a2e1fd67700c79c4bbe8b9ab7d5ebd9e5bf (diff)
downloadmpfr-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
Diffstat (limited to 'BUGS')
-rw-r--r--BUGS23
1 files changed, 23 insertions, 0 deletions
diff --git a/BUGS b/BUGS
index 94bdfaf68..5295f380a 100644
--- a/BUGS
+++ b/BUGS
@@ -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).
+
+