summaryrefslogtreecommitdiff
path: root/BUGS
blob: 8d4244230b45bb4017d4b3768674324dead62643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Copyright 1999, 2001, 2002, 2003, 2004, 2005 Free Software Foundation.
Contributed by the Spaces project, INRIA Lorraine.

This file is part of the MPFR Library.

The MPFR Library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.

The MPFR Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
License for more details.

You should have received a copy of the GNU Lesser General Public License
along with the MPFR Library; see the file COPYING.LIB.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.

##############################################################################

Probably many bugs.

Known bugs:

* The overflows/underflows are partially implemented in some functions.
  For instance, mpfr_pow (z, x, y, rnd) fails for very small x and some
  values of y.

* The mpfr_set_ld function assumes that the long double type has an
  exponent of at most 15 bits.

* In mpfr_get_ld, the rounding direction can be wrong if |x| < LDBL_MIN.

* When MPFR is compiled with Visual C++ under MS Windows, some tests may
  fail, because of the way special IEEE-754 double values are tested.

Potential bugs:

* Possible integer overflows on some machines. Some types are used
  inconsistently.

* Possible infinite loop in some functions for particular cases: when
  the exact result is an exactly representable number or the middle of
  consecutive two such numbers.

* mpfr_set_d may give wrong results on some architectures.

* Error analysis for some functions may be incorrect (out-of-date due
  to modifications in the code?).

* 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).