critical bug in mpf_set_str
tg at swox.com
Mon Feb 16 19:38:26 CET 2004
Paul.Zimmermann at loria.fr (Paul Zimmermann) writes:
There is a critical bug in gmp-4.1.2: two equal (up to trailing zeros)
strings are converted into different floating-point numbers:
mermoz% gcc gmp_bug.c -lgmp
I would argue that this is not a bug, it is merely a surprising
effect of rounding. There are a few rough corners in mpf of this
We have been considering to refine mpf to handle rounding better.
Its current "rounding" is basically just chopping, which at best
means rounding towards zero.
More information about the gmp-bugs