[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fw: maybey an error in mpf_cmp
From: |
Kevin Ryde |
Subject: |
Re: Fw: maybey an error in mpf_cmp |
Date: |
Wed, 27 Nov 2002 09:58:39 +1000 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.1 (i386-debian-linux-gnu) |
address@hidden (Paul Zimmermann) writes:
>
> mpf_out_str (stdout, 2, x->_mp_size * mp_bits_per_limb, x);
mpf_out_str never prints more digits than the user requested
precision, even when _mp_size is bigger, which is what's happening
here. x is 3 limbs, y is 4 limbs.
There's notes about the possible extra limb of precision in the
internals chapter of the manual. Usually it does only good, but it's
a bit of a trap I guess. In general testing two floats for exact
equality of course is a bad idea. mpf_eq would perhaps be the
function to use, if it worked like it's meant to :(.
mpfr does a better job with all this.