GMP gives wrong (negative) results

V. Nicolai Friedhoff vnf at
Fri Mar 31 08:55:28 UTC 2017

Dear GMP Mailinglist,

I am using GMP to calculate the value of a convergent series f(x) which
includes large numbers. That function f(x) is a Cauchy product of two other
convergent series, the exponential function and the 2F2 Hypergeometric
For small values of x<29 the results seem to be correct, so I am sure that
my maths and my implementation is correct. But for larger x>29 the results
are wrong and even negative (the function should be positive for positive

What is wrong when GMP gives me negative results for a function that should
be positive once some numbers become large?

More details can be found in this stack overflow question i created

BTW: Something similar happens on Mathematica. For approximately x>120 the
function also becomes abruptly negative.

Thank you a lot, Best,

More information about the gmp-discuss mailing list