Post Reply 
Can you calculate Pi using a Solver?
12-17-2019, 01:22 AM
Post: #36
RE: Can you calculate Pi using a Solver?
.
Hi, Werner:

(12-16-2019 12:31 PM)Werner Wrote:  
(12-14-2019 12:56 AM)Valentin Albillo Wrote:  Code for the HP-71B, where FNROOT (Find Root) is the "official" HP-71B's "Solver":

     1   DEF FNF(X) = FNROOT(1, 1, GAMMA(FVAR) - X)
     2   DISP FNROOT(3, 4, FNF(SQR(FVAR)) - 1/2)

>RUN

          3.14159265359

This produces as a root the theoretically exact (not an approximation) value of Pi.

V.

Hi, Valentin!
Why not just use GAMMA(0.5) - SQRT(X) = 0 as the generating equation?
I don't own a 71, but then it ought to be something like
DISP FNROOT(3, 4, GAMMA(1/2) - SQR(FVAR) )


Because that's not much use of a Solver as the OP intended it, i.e.: to solve some equation which isn't explicitly solvable (i.e: the variable can't be isolated, e.g.: cos(x)-x=0), doesn't involve trigs, and of course doesn't feature Pi explicitly in the equation.

Your proposed equation fails in those regards. For starters, Gamma(1/2) is a *constant*, namely √Pi. You can call it "Gamma(1/2)" or you can call it "Pepe" but it's still just √Pi.

So, your equation becomes:

          √Pi - SQRT(X) = 0    →   √x = √Pi   →    x = Pi

and not only does it have the variable x isolated and Pi included in the equation but it's also as utterly trivial as it gets, and probably this is not what the OP was asking for.

Anyway, thanks for your question and most of all, for your interest.

And if you don't own an HP-71B but would like to, there are at least two excellent, free Emu71 out there (running in MS-DOS, DOS console in Win/16/32, or full-GUI Win/16/32/64 or under DOSEMU in any operating system, Android included and even some electronic-ink eBook readers) which you can download. For free.

Best regards.
V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Can you calculate Pi using a Solver? - Valentin Albillo - 12-17-2019 01:22 AM



User(s) browsing this thread: 1 Guest(s)