0.7 / 1.0 ?= 0.52
tg at gmplib.org
Fri Jun 15 17:18:38 CEST 2012
Hans Aberg <haberg-1 at telia.com> writes:
I had to wrap it into a function, and change the Haskell style '--'
comments into C/C++ style (see below). Then just use any of the
compilers mentioned above.
gmp_printf ("%.*Ff \n", 5, b); // Prints 1.00000
mpf_div(l, a, b);
gmp_printf ("%.*Ff", 5, l); // Prints 0.70000
Wait a minute, you edited the comment to say what your expect to get
printed! Perhaps the pesky llvm read your comment and got things right
as a result?
(Seriously though, we cannot draw any conclusion by this debacle. The
guy might have really buggy code which corrupted the heap and stack,
provoking a state in which anything can happen from a GMP call. I think
that's actually at least as likely as having struck an llvm bug. No
real test case, no case!)
More information about the gmp-bugs