Post Reply 
Viète à grande Vitesse or Accelerated Viète (kind of)
06-25-2024, 01:19 PM
Post: #24
RE: Viète à grande Vitesse or Accelerated Viète (kind of)
(06-25-2024 12:41 AM)Albert Chan Wrote:  [quote='Gerson W. Barbosa' pid='188722' dateline='1719265376']

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

Code:

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 …

Yes, except that it is difficult to use it when we need all the stack for something else afterwards. Unless, of course, we use a numbered register, as in Vh and Vf below. The latter uses a formula to generate the coefficients in the format (1 + n/d), but this works only for the three first coefficients.
Code:

00 { 92-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
13 1/X
14 ×
15 STO 01
16 LASTX
17 X↑2
18 ENTER
19 ENTER
20 ENTER
21 9
22 ×
23 22400
24 ÷
25 27
26 11200
27 ÷
28 +
29 ×
30 3
31 560
32 ÷
33 +
34 ×
35 5
36 112
37 ÷
38 +
39 ×
40 3
41 40
42 ÷
43 +
44 ×
45 6
46 1/X
47 +
48 ×
49 1
50 +
51 RCL× 01
52 END
Code:

00 { 85-Byte Prgm }
01▸LBL "Vf"
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
13 1/X
14 ×
15 STO 01
16 LASTX
17 X↑2
18 3
19▸LBL 01
20 X<>Y
21 3
22 RCL ST Z
23 +/-
24 NOT
25 Y↑X
26 RCL ST Y
27 R↑
28 Y↑X
29 STO× ST Y
30 CLX
31 2
32 LASTX
33 Y↑X
34 STO÷ ST Y
35 X<> ST L
36 ENTER
37 SIGN
38 STO+ ST Y
39 X<> ST L
40 STO+ ST Y
41 COMB
42 STO÷ ST Y
43 R↓
44 LASTX
45 SIGN
46 STO+ ST Y
47 R↓
48 STO× 01
49 X<> ST L
50 DSE ST X
51 GTO 01
52 X<> 01
53 END
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) - Gerson W. Barbosa - 06-25-2024 01:19 PM



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