definite integral competition between HP50g a. DM42

Discussion around the SwissMicros DM42 calculator
Post Reply
peacecalc
Posts: 13
Joined: Sun Jun 28, 2020 10:25 pm

definite integral competition between HP50g a. DM42

Post by peacecalc »

Hello folks,

and the winner is....

ahh, I not like to spoiler the result. What was the job of the competitors?

a) Of course numerical, because the hp50g lives in both worlds, the dm42 is only working with numbers.
b) The Fresnel-Integrals have to be calculated.
c) as pair on the stack y-stack has the S(x) result and x-stack contains the result for C(x)
d) hp50g is set in approx. mode and fix 4 (is necessary for accuracy).
dm42 gets 1E-5 for the ACC-variable for controlling accuracy...

e) Definitions of the two Integrals:
Frenels-Integrale.PNG
Frenels-Integrale.PNG (16.05 KiB) Viewed 1696 times
f) Maybe a further information, these definite integrals can only calculated numerically. Except for x -> +- infinite.
S(3.9) = 0.4752 and C(3.9) = 0.4223;

Sorry for inserting a pic, but I don't know how to insert TeX commands directly.

DM42 beats the Hp50g in being three times faster by equal accuracy!
peacecalc
Posts: 13
Joined: Sun Jun 28, 2020 10:25 pm

Re: definite integral competition between HP50g a. DM42

Post by peacecalc »

Hello all,

in the hpmuseum.org forum there is a totally another approach fopr the fresnel integrals: https://www.hpmuseum.org/forum/thread-15480-page-2.html

for arguments x < SQRT(pi) it is a serie calculation and for greater arguments it uses a continued fraction.
Thanks to JMBaillard for sharing!

Code: Select all

00 { 166-Byte Prgm }
01▸LBL "CSX"
02 STO 01
03 ABS
04 PI
05 SQRT
06 X>Y?
07 GTO 04
08 DEG
09 ×
10 24
11 STO 02
12 CLX
13 2
14 ÷
15 STO 03
16 ENTER
17▸LBL 01
18 X<>Y
19 +/-
20 STO ST Z
21 X↑2
22 RCL ST Y
23 X↑2
24 +
25 DSE 02
26 X<0?
27 GTO 02
28 RCL 02
29 X<>Y
30 STO+ ST X
31 ÷
32 STO× ST Z
33 ×
34 RCL 03
35 STO+ ST Z
36 +
37 GTO 01
38▸LBL 02
39 PI
40 SQRT
41 ×
42 STO÷ ST Z
43 ÷
44 →POL
45 RCL 01
46 X↑2
47 90
48 ×
49 R↑
50 -
51 X<>Y
52 +/-
53 →REC
54 1
55 +
56 STO ST Z
57 X<>Y
58 STO+ ST Z
59 -
60 2
61 STO÷ ST Z
62 ÷
63 GTO 05
64▸LBL 03
65 X<> 00
66 PI
67 2
68 STO+ 02
69 ÷
70 RCL 01
71 X↑2
72 ×
73 X↑2
74 ×
75 RCL 02
76 ENTER
77 DSE ST X
78 ×
79 ÷
80 +/-
81 STO 00
82 RCL 02
83 STO+ ST X
84 ISG ST X
85 CLX
86 ÷
87 X<>Y
88 STO+ ST Y
89 X≠Y?
90 GTO 03
91 RTN
92▸LBL 04
93 CLX
94 STO 02
95 X<>Y
96 STO 00
97 ENTER
98 XEQ 03
99 STO 03
100 1
101 STO 02
102 RCL 01
103 ABS
104 3
105 Y↑X
106 PI
107 ×
108 2
109 ÷
110 STO 00
111 3
112 ÷
113 ENTER
114 XEQ 03
115 RCL 03
116▸LBL 05
117 RCL 01
118 SIGN
119 STO× ST Y
120 STO× ST Z
121 R↓
122 END
Some commands are different: f. i. STO+ X is replaced by STO+ ST X;
Have fun!
Post Reply