Post Reply 
(DM42) Harmonic function based on Bernoulli - 32 digits
12-12-2022, 03:19 PM (This post was last modified: 12-12-2022 03:20 PM by Werner.)
Post: #2
RE: (DM42) Harmonic function based on Bernoulli - 32 digits
Hi Gjermund!
Doing the same with a Horner-like scheme, independent of stack mode (I think).
I also stored gamma in a variable..

00 { 75-Byte Prgm }
01▸LBL "Hn"
02 FUNC 11
03 40
04 X>Y?
05 GTO 00
06 R↓
07 X^2
08 0
09 INDEX "B10"
10 I-
11▸LBL 01
12 RCLIJ
13 STO+ ST X
14 ×
15 RCLEL
16 X<>Y
17 ÷
18 +
19 RCL÷ ST Y @ in 4STK mode, R^ / would work as well
20 I-
21 FC? 77
22 GTO 01
23 X<>Y
24 SQRT @ n
25 LN
26 LASTX
27 STO+ ST X
28 1/X
29 +
30 RCL+ "GAMMA"
31 X<>Y
32 -
33 RTN
34▸LBL 00
35 CLX
36▸LBL 02
37 RCL ST Y
38 1/X
39 +
40 DSE ST Y
41 GTO 02
42 END

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (DM42) Harmonic function based on Bernoulli - 32 digits - Werner - 12-12-2022 03:19 PM



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