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: Potential bugs: * The overflows/underflows exceptions may be badly handled in some functions. * Possible integer overflows on some machines. * Possible bugs with huge precisions (> 2^30). * Possible bugs if the chosen exponent range does not allow to represent the range [1/16, 16]. * 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 (for example, erf). * The mpfr_set_ld function may be quite slow if the long double type has an exponent of more than 15 bits. * mpfr_set_d may give wrong results on some non-IEEE architectures. * Error analysis for some functions may be incorrect (out-of-date due to modifications in the code?). 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 #include #include 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).