Documentation on MPFR-2.0.1

  • MPFR in two pages
  • The reference manual [dvi, ps, pdf]
  • A presentation at the Arith'15 workshop organized by David Hough

    Known bugs

  • The function mpfr_cmp_si(b,i) returns an incorrect result when b=0 and i is negative. Apply the following patch to fix that.

  • On some machines, the tget_d test fails:
    Wrong result for -17 * 2^(-1079), rnd_mode 0
    got -0.00000000000000000000e+00 instead of -4.94065645841246540000e-324
    This is a bug in gcc, which makes the mpfr_get_d function fail for subnormal numbers. Apply the following patch to fix that.

  • The function mpfr_pow loops for exact results like 4.0 power 0.5, or does not deal correctly with overflows. Apply the following patch to fix that

  • The function mpfr_set_q produces an error when the numerator or denominator is one. Apply the following patch.

  • If you want to compile mpfr-2.0.1 with gmp-4.1, you will have a problem since the GMP developers changed the name of the macro MP_LIMB_T_HIGHBIT. Apply the following patch to the file mpfr-impl.h.

  • The function mpfr_set_str doesn't accept uppercase letters as mpf_set_str does. Apply the following patch to the file set_str.c.

  • The function mpfr_sub sometimes return a wrong inexact flag for arguments of opposite sign. The computed result is correct: this only affect the inexact flag. Patch.

  • The function mpfr_urandomb sometimes produces a Segmentation fault. Patch.

  • The function mpfr_exp may return a wrong result for large argument. Patch.

  • The function mpfr_agm produces a division by zero exception when its arguments are too close. Patch.

  • The function mpfr_out fails when its first argument is NULL. Patch.