Blame BUGS

Packit fbef6a
Copyright 1999, 2001-2017 Free Software Foundation, Inc.
Packit fbef6a
Contributed by the AriC and Caramba projects, INRIA.
Packit fbef6a
Packit fbef6a
This file is part of the GNU MPFR Library.
Packit fbef6a
Packit fbef6a
The GNU MPFR Library is free software; you can redistribute it and/or modify
Packit fbef6a
it under the terms of the GNU Lesser General Public License as published by
Packit fbef6a
the Free Software Foundation; either version 3 of the License, or (at your
Packit fbef6a
option) any later version.
Packit fbef6a
Packit fbef6a
The GNU MPFR Library is distributed in the hope that it will be useful, but
Packit fbef6a
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
Packit fbef6a
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
Packit fbef6a
License for more details.
Packit fbef6a
Packit fbef6a
You should have received a copy of the GNU Lesser General Public License
Packit fbef6a
along with the GNU MPFR Library; see the file COPYING.LESSER.  If not, see
Packit fbef6a
http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
Packit fbef6a
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
Packit fbef6a
Packit fbef6a
##############################################################################
Packit fbef6a
Packit fbef6a
Known bugs:
Packit fbef6a
Packit fbef6a
* The overflow/underflow exceptions may be badly handled in some functions;
Packit fbef6a
  specially when the intermediary internal results have exponent which
Packit fbef6a
  exceeds the hardware limit (2^30 for a 32 bits CPU, and 2^62 for a 64 bits
Packit fbef6a
  CPU) or the exact result is close to an overflow/underflow threshold.
Packit fbef6a
Packit fbef6a
* Under Linux/x86 with the traditional FPU, some functions do not work
Packit fbef6a
  if the FPU rounding precision has been changed to single (this is a
Packit fbef6a
  bad practice and should be useless, but one never knows what other
Packit fbef6a
  software will do).
Packit fbef6a
Packit fbef6a
* Some functions do not use MPFR_SAVE_EXPO_* macros, thus do not behave
Packit fbef6a
  correctly in a reduced exponent range.
Packit fbef6a
Packit fbef6a
* Function hypot gives incorrect result when on the one hand the difference
Packit fbef6a
  between parameters' exponents is near 2*MPFR_EMAX_MAX and on the other hand
Packit fbef6a
  the output precision or the precision of the parameter with greatest
Packit fbef6a
  absolute value is greater than 2*MPFR_EMAX_MAX-4.
Packit fbef6a
Packit fbef6a
Potential bugs:
Packit fbef6a
Packit fbef6a
* Possible incorrect results due to internal underflow, which can lead to
Packit fbef6a
  a huge loss of accuracy while the error analysis doesn't take that into
Packit fbef6a
  account. If the underflow occurs at the last function call (just before
Packit fbef6a
  the MPFR_CAN_ROUND), the result should be correct (or MPFR gets into an
Packit fbef6a
  infinite loop). TODO: check the code and the error analysis.
Packit fbef6a
Packit fbef6a
* Possible integer overflows on some machines.
Packit fbef6a
Packit fbef6a
* Possible bugs with huge precisions (> 2^30).
Packit fbef6a
Packit fbef6a
* Possible bugs if the chosen exponent range does not allow to represent
Packit fbef6a
  the range [1/16, 16].
Packit fbef6a
Packit fbef6a
* Possible infinite loop in some functions for particular cases: when
Packit fbef6a
  the exact result is an exactly representable number or the middle of
Packit fbef6a
  consecutive two such numbers. However for non-algebraic functions, it is
Packit fbef6a
  believed that no such case exists, except the well-known cases like cos(0)=1,
Packit fbef6a
  exp(0)=1, and so on, and the x^y function when y is an integer or y=1/2^k.
Packit fbef6a
Packit fbef6a
* The mpfr_set_ld function may be quite slow if the long double type has an
Packit fbef6a
  exponent of more than 15 bits.
Packit fbef6a
Packit fbef6a
* mpfr_set_d may give wrong results on some non-IEEE architectures.
Packit fbef6a
Packit fbef6a
* Error analysis for some functions may be incorrect (out-of-date due
Packit fbef6a
  to modifications in the code?).
Packit fbef6a
Packit fbef6a
* Possible use of non-portable feature (pre-C99) of the integer division
Packit fbef6a
  with negative result.