diff options
Diffstat (limited to 'mpfr/get_z_exp.c')
-rw-r--r-- | mpfr/get_z_exp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mpfr/get_z_exp.c b/mpfr/get_z_exp.c index c98b6bdd0..c409b9b59 100644 --- a/mpfr/get_z_exp.c +++ b/mpfr/get_z_exp.c @@ -29,8 +29,8 @@ MA 02111-1307, USA. */ /* puts the mantissa of f into z, and returns 'exp' such that f = z * 2^exp * * 0 doesn't have an exponent, therefore the returned exponent in this case - * isn't really important. We choose to return __mpfr_emin because - * 1) it is in the exponent range [__mpfr_emin,__mpfr_emax], + * isn't really important. We choose to return __gmpfr_emin because + * 1) it is in the exponent range [__gmpfr_emin,__gmpfr_emax], * 2) the smaller a number is (in absolute value), the smaller its * exponent is. In other words, the f -> exp function is monotonous * on nonnegative numbers. @@ -48,7 +48,7 @@ mpfr_get_z_exp (mpz_ptr z, mpfr_srcptr f) if (MPFR_IS_ZERO(f)) { mpz_set_ui (z, 0); - return __mpfr_emin; + return __gmpfr_emin; } fn = 1 + (MPFR_PREC(f) - 1) / BITS_PER_MP_LIMB; @@ -63,7 +63,7 @@ mpfr_get_z_exp (mpz_ptr z, mpfr_srcptr f) else MPN_COPY (PTR(z), MPFR_MANT(f), fn); - SIZ(z) = fn; + SIZ(z) = MPFR_SIGN(f) < 0 ? -fn : fn; MPFR_ASSERTN((mp_exp_unsigned_t) MPFR_EXP(f) - MPFR_EMIN_MIN >= (mp_exp_unsigned_t) MPFR_PREC(f)); |