Post Reply 
Viète à grande Vitesse or Accelerated Viète (kind of)
06-25-2024, 12:41 AM
Post: #23
RE: Viète à grande Vitesse or Accelerated Viète (kind of)
(06-24-2024 09:42 PM)Gerson W. Barbosa Wrote:  They say engineers round \(\pi\) to 4 just in case.
Being an engineer, that’s exactly what I have done at step 42 :-)

pi = 4 ... and it actually work! Big Grin

Turns out I don't need to recover 2^(n+1). It was already there!

This version is going for simplicity, which turns out pretty good.

ε = asin(z)/z - 1 ≈ z^2/6 / (1 - 9/20*z^2) = 1 / (6/z^2 - 2.7)

Code:
00 { 38-Byte Prgm }
01▸LBL "Vh"
02 2
03 0
04 SIGN
05▸LBL 00
06 2
07 STO× ST Z
08 RCL+ ST L
09 SQRT
10 ×
11 DSE ST Z
12 GTO 00       @ 1/z     2^(n+1)
13 ÷     
14 2.7   
15 6     
16 LASTX        @ 1/z     6     2.7   pi'
17 X↑2   
18 ×     
19 -            @ -1/eps  pi'   pi'   pi'
20 ÷
21 -
22 END

1   --> 3.132559073643629893044600829969869
17 --> 3.141592653589793238462643383279402
18 --> 3.141592653589793238462643383279501
19 --> 3.141592653589793238462643383279502
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Viète à grande Vitesse or Accelerated Viète (kind of) - Albert Chan - 06-25-2024 12:41 AM



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