GMP gives wrong (negative) results

James Wanless james at grok.ltd.uk
Fri Mar 31 10:33:36 UTC 2017


Try a compiler that predates Clang - you might have more luck
J

On 31 Mar 2017, at 09:55, V. Nicolai Friedhoff wrote:

> 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
> function.
> 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
> x).
>
> 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
> yesterday:
>
> http://stackoverflow.com/questions/43121211/gmp-gives-wrong-result-of-a-series-expansion
>
>
> BTW: Something similar happens on Mathematica. For approximately  
> x>120 the
> function also becomes abruptly negative.
>
> Thank you a lot, Best,
> Nicolai
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss



More information about the gmp-discuss mailing list