mpz_get_d() with rounding
Jeroen Demeyer
jdemeyer at cage.ugent.be
Wed May 21 15:55:42 UTC 2014
The function mpz_get_d() rounds towards zero. This is incompatible with
the usual floating-point semantics of rounding to nearest. In C on my
machine for example, a conversion from unsigned long to double rounds to
nearest. Would you agree with adding additional functions (or one
function with an MPFR-style rounding flag) for other rounding modes?
Jeroen.
More information about the gmp-discuss
mailing list