Post Reply 
HP42s first major program (Double Integral) Best way to approach?
06-02-2020, 05:01 PM
Post: #43
RE: HP42s first major program (Double Integral) Best way to approach?
okay, final update then:
will now work when b<c and/or a<c, as well; and a few more optimisations.

Code:
00 { 185-Byte Prgm }
01▸LBL "BORE"
02 MVAR "a"
03 MVAR "b"
04 MVAR "c"
05▸LBL 10
06 VARMENU "BORE"
07 RTN
08 RCL "a"
09 XEQ 03
10 LSTO "t"
11 RCL "b"
12 XEQ 03
13 RCL- "t"
14 GTO 10
15▸LBL 03
16 RCL "c"
17▸LBL "HV"
18 X>Y?
19 X<>Y
20 LSTO "d"
21 X<>Y
22 LSTO "D"
23 ÷
24 XEQ "EK"
25 RCL- ST Y
26 X<>Y
27 LASTX
28 +
29 RCL "d"
30 X↑2
31 ×
32 X<>Y
33 RCL "D"
34 X↑2
35 ×
36 +
37 RCL× "D"
38 3
39 ÷
40 RTN
41▸LBL "EK"
42 X↑2
43 SIGN
44 LASTX
45 -
46 SQRT
47 SIGN
48 LASTX
49 STO+ ST Y
50 SQRT
51 STO+ ST X
52 XEQ "AGM2"
53 PI
54 X<>Y
55 ÷
56 STO× ST Y
57 X<>Y
58 4
59 ÷
60 RTN
61▸LBL "AGM2"
62 LSTO "B"
63 SIGN
64 +/-
65 LSTO "T"
66 R↓
67 LSTO "A"
68 X↑2
69▸LBL 02
70 RCL "A"
71 RCL× "B"
72 SQRT
73 X<> "B"
74 RCL- "A"
75 2
76 STO× "T"
77 ÷
78 STO+ "A"
79 X↑2
80 RCL× "T"
81 RCL+ ST Y
82 X≠Y?
83 GTO 02
84 RCL "B"
85 END

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-02-2020 05:01 PM



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