Can you calculate Pi using a Solver?
|
12-11-2019, 01:09 PM
(This post was last modified: 12-11-2019 10:14 PM by Albert Chan.)
Post: #14
|
|||
|
|||
RE: Can you calculate Pi using a Solver?
(12-11-2019 11:50 AM)toml_12953 Wrote: It shows that both an inscribed and circumscribed polygon approach PI as the number of sides increases. We can do this with right triangles, starting from a hexagon ("radius" = side = 2S = 1) 10 N=6 @ S=.5 20 H=SQRT(1-S*S) @ A=N*S @ B=A/H 30 DISP N,A,B 40 N=N+N @ S=.5*SQRT(S^2+(1-H)^2) 50 IF A<B THEN 20 Code: >RUN Edit: line 40 may be replaced with simpler formula (approx. same accuracy) 40 N=N+N @ S=S/SQRT(H+H+2) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 11 Guest(s)