Bill Allombert on Sun, 17 Dec 2017 23:40:37 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Verification of floating-point equalities


On Sun, Dec 17, 2017 at 09:45:05PM +0000, Jacques Gélinas wrote:
> With its multiple precision accuracy, Pari/GP can be used to check simple equalities, 
> such as this one proven last week for the golden ratio \phi (arXiv 1712.04856) :
> 
>     2/(sqrt(5)-1) == 2^(2/5)*sqrt(5)*gamma(1/5)^4/gamma(1/10)^2/gamma(3/10)^2
> 
> For this I have used two methods,
> 
> fleq(aprx, xact, N=2/3*precision(1.)) = abs( if(!xact, aprx,1 - aprx/xact) ) < 1/10^N;
> fleq( sin(1000*Pi) )
> fleq( zeta(-1), -1/12)
> 
> phi = (sqrt(5)+1)/2;
> lindep( log([phi,2,5,gamma(1/10),gamma(2/10),gamma(3/10)]) ) == [-10, 4, 5, -20, 40, -20]~
> 
> Question: How do you verify such floating-point equalities ?

The identity looks like an instance of the Chowla-Selberg formula.

You can get a similar result with the 11-adic Gamma function with
the Gross-Koblitz formula.

Cheers
Bill.