HP Forums
Can you calculate Pi using a Solver? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Can you calculate Pi using a Solver? (/thread-14132.html)

Pages: 1 2 3


RE: Can you calculate Pi using a Solver? - Gamo - 01-09-2020 12:10 PM

HP-15C have a SOLVE function but I find the better way
to find the estimated value of Pi just by using the GAMMA function.

Formula: [ Γ(1/2) ]^2 = Pi

To find the estimated value of Pi follow this keystroke steps:

[.] 5 [ENTER] 1 [-] display -0.5 [x!] display 1.772453851 [x^2]

display 3.141592654

Answer is the same from the built-in Pi function.

Gamo


RE: Can you calculate Pi using a Solver? - Namir - 01-10-2020 05:25 PM

Using the series developed by the Chudnovsky formula published in 1987, I can calculate pi to 14 digits using just ONE TERM!:

1/pi=12/640320^1.5*13591409
pi = 640320^1.5/(12*13591409)

Namir


RE: Can you calculate Pi using a Solver? - Valentin Albillo - 01-11-2020 12:21 AM

(01-10-2020 05:25 PM)Namir Wrote:  Using the series developed by the Chudnovsky formula published in 1987, I can calculate pi to 14 digits using just ONE TERM!: [...]
pi = 640320^1.5/(12*13591409)

Namir

Your expression includes 640320, 1.5, 12 and 13591409, which means you're using 18 digits to get just 14 digits of Pi.

That's highly inefficient: using 18 digits to output 14 digits => 18-14 = -4 digits "gained" (lost, more like).

Far better woould be:

          3*Ln(640320)/√163 = 3,1415926535897930+

which gives 17 digits (save 2 ulps) while using just 10 digits, i.e., 17-10 = +7 digits gained.

Besides, nothing of this has anything to do with getting Pi using a Solver, as the OP requested.

V.


RE: Can you calculate Pi using a Solver? - Namir - 01-11-2020 12:34 AM

(01-11-2020 12:21 AM)Valentin Albillo Wrote:  
(01-10-2020 05:25 PM)Namir Wrote:  Using the series developed by the Chudnovsky formula published in 1987, I can calculate pi to 14 digits using just ONE TERM!: [...]
pi = 640320^1.5/(12*13591409)

Namir

Your expression includes 640320, 1.5, 12 and 13591409, which means you're using 18 digits to get just 14 digits of Pi.

That's highly inefficient: using 18 digits to output 14 digits => 18-14 = -4 digits "gained" (lost, more like).

Far better woould be:

          3*Ln(640320)/√163 = 3,1415926535897930+

which gives 17 digits (save 2 ulps) while using just 10 digits, i.e., 17-10 = +7 digits gained.

Besides, nothing of this has anything to do with getting Pi using a Solver, as the OP requested.

V.

Thanks for your version. I don't see the logic in using Solve to calculate pi. Curiosity to use Solve? Maybe? Using recursive formulas or even integrals comes across as more sensical.

Your version, based on a single-term of the the Chudnovsky formula, leaves 355/113 in the dust!!!

Namir


RE: Can you calculate Pi using a Solver? - Valentin Albillo - 01-11-2020 01:01 AM

(01-11-2020 12:34 AM)Namir Wrote:  
(01-11-2020 12:21 AM)Valentin Albillo Wrote:  Far better woould be:

          3*Ln(640320)/√163 = 3,1415926535897930+

which gives 17 digits (save 2 ulps) while using just 10 digits, i.e., 17-10 = +7 digits gained.

Besides, nothing of this has anything to do with getting Pi using a Solver, as the OP requested.

Thanks for your version. I don't see the logic in using Solve to calculate pi. Curiosity to use Solve? Maybe? Using recursive formulas or even integrals comes across as more sensical.

It's not a question of "logic" or of being "more sensical". The OP simply was curious to know if it could be done using a Solver so posted it as a kind of "challenge", nothing else.

Quote:Your version, based on a single-term of the the Chudnovsky formula, leaves 355/113 in the dust!!!

My version isn't "based on a single-term of the Chudnovsky formula" as yours is; actually it's based on the Ramanujan's constant, i.e.: cf. Wikipedia:

"Ramanujan's constant is the transcendental number e^(Pi*sqrt(163)), which is an almost integer, in that it is very close to an integer: 262,537,412,640,768,743.99999999999925... , approximately equal to 640,320^3+744. [...] This coincidence is explained by complex multiplication and the q-expansion of the j-invariant."

V.


RE: Can you calculate Pi using a Solver? - EdS2 - 01-11-2020 09:11 AM

(01-11-2020 12:21 AM)Valentin Albillo Wrote:            3*Ln(640320)/√163 = 3,1415926535897930+

which gives 17 digits (save 2 ulps) while using just 10 digits, i.e., 17-10 = +7 digits gained.
Also good value, also by Ramanujan:
√√(9^2 + 19^2/22) = 3.14159265258...
(via a commenter on an article by David Bau)

Also can be written as
√√(2143/22) = 3.14159265258...
for slightly better value.


RE: Can you calculate Pi using a Solver? - Paul Dale - 01-11-2020 09:49 AM

The Wikipedia article for Ramanujan's constant claims transcendental with a reference to the Mathsworld article with only claims irrationality.

Which is correct?

Irrationality is easy to believe. Transcendence is not much harder (albeit much harder to prove).


Pauli