Post Reply 
HP42s first major program (Double Integral) Best way to approach?
06-01-2020, 01:02 PM
Post: #35
RE: HP42s first major program (Double Integral) Best way to approach?
Well, I had to try that out, Albert!
It's more than 10x faster than the integral solution: (which is noticeable on a DM42):

Code:
00 { 207-Byte Prgm }
01▸LBL "BORE"
02 MVAR "A"
03 MVAR "B"
04 MVAR "C"
05▸LBL 10
06 VARMENU "BORE"
07 RTN
08 RCL "C"
09 RCL "A"
10 XEQ "HV"
11 LSTO "t"
12 RCL "C"
13 RCL "B"
14 XEQ "HV"
15 RCL- "t"
16 GTO 10
17▸LBL "AGM2"
18 LSTO "B"
19 R↓
20 LSTO "A"
21 X↑2
22 LSTO "S"
23 0.5
24 LSTO "T"
25▸LBL 02
26 RCL "A"
27 RCL× "B"
28 SQRT
29 X<> "B"
30 RCL- "A"
31 RCL ST X
32 2
33 ÷
34 STO+ "A"
35 RCL "S"
36 STO ST Y
37 RCL "T"
38 STO+ "T"
39 R↑
40 X↑2
41 ×
42 -
43 STO "S"
44 X≠Y?
45 GTO 02
46 RCL "A"
47 X<>Y
48 RTN
49▸LBL "KE"
50 X↑2
51 1
52 -
53 +/-
54 SQRT
55 1
56 X<>Y
57 STO+ ST Y
58 SQRT
59 STO+ ST X
60 XEQ "AGM2"
61 X<>Y
62 PI
63 X<>Y
64 ÷
65 STO× ST Y
66 X<>Y
67 4
68 ÷
69 RTN
70▸LBL "HV"
71 LSTO "D"
72 X<>Y
73 LSTO "d"
74 X<>Y
75 ÷
76 XEQ "KE"
77 RCL- ST Y
78 X<>Y
79 LASTX
80 +
81 RCL "d"
82 X↑2
83 ×
84 X<>Y
85 RCL "D"
86 X↑2
87 ×
88 +
89 RCL× "D"
90 3
91 ÷
92 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: HP42s first major program (Double Integral) Best way to approach? - Werner - 06-01-2020 01:02 PM



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