Number of digits correct:
digits(x)=-log(abs(Pi-x))/log(10)
Later versions of Pari/GP may have to use a different name for this function.
? digits(3.14)
2.8
? digits(22/7)
2.9
? digits(355/113)
6.6
? digits(sqrt(sqrt(2143/22)))
9.0
The fraction above can be written 3^4+2^4+1/(2+(2/3)^2) = 9^2+19^2/22 . Previously discussed.
? u=5^4+53*sqrt(89) ; digits(80*sqrt(15)*u^(3/2)/(3308*u-3*sqrt(89)))
17.999
? digits(log(396^4-104)/sqrt(58))
18.02
Previously discussed.
? digits(12*log((3+sqrt(10))*(sqrt(8)+sqrt(10)))/sqrt(190))
18.6
? digits(log(640320^3+744)/sqrt(163))
30.7
? digits(log((640320^3+744)^2 - 2*196884)/(2*sqrt(163)))
46.0
? digits(log((5280*(236674+30303*sqrt(61)))^3+744)/sqrt(427))
52.4
q(x)=x+sqrt(x^2-1)
? s=sqrt(17) ; t=sqrt(2) ; a=(23+4*t*s)/2 ; b=(19*t+7*s)/2 ; c=429+304*t ; d=(627+442*t)/2 ; u=q(a)^2*q(b)^2*q(c)*q(d) ; digits(log((2*u)^6+24)/sqrt(3502))
160.8
GP allows multiple nullary variables to be defined on a single line, separated by semicolons, but I cannot find a way to also define a function q(x) in a one-liner followed by more variable assignments. The scope extends to the end of the line, allowing functions with semicolons in them.
Create a mechanical or geometric demonstration of these approximations.
Most of these came from the following two sources.
http://mathworld.wolfram.com/PiApproximations.html
https://en.wikipedia.org/w/index.php?title=Approximations_of_%CF%80&oldid=747343519
No comments :
Post a Comment