-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPERE10.TXT
143 lines (143 loc) · 2.49 KB
/
PERE10.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
LBL "PERE10" ;ellipse perimeter calculus
;similar to a modified shortened cycloid rolling on a flat ground
;X= (pi/4)*F(t) -(0.5-sqrt(2)/pi)*sin(t)
;Y= 0.5 +sqrt(2)/pi +(0.5-sqrt(2)/pi)*cos(t)
;F(t) instead of t in a shortened cycloid
;
;input
; a ENTER b ENTER XEQ PERE10
; a and b half ellipse parameter
;
;output
; Perimeter
;
;R22-24 used
;R07-08 A and B
;
;under CC BY SA creative commons 4.0 pascaldagornet at yahoo dot de
;
;create raw files with "hp41uc.exe /t=PERE10.TXT /r /k"
; then upload in PC emulator / virtual drive / HP41 hardware
;
;change log
;
;2021 11 18 creation
; new F(t) found with SCFPER2
; https://www.desmos.com/calculator/uyi2h2o3g2?lang=de
; 0= t**2
; -1.04508*t*F(t)
; +0.189207*F(t)**2
; +0.210357*t
; -0.354484*F(t)
; solution F(t)= ((0.354484 +1.04508*t)
; - SQRT((0.354484 +1.04508*t)**2
; - 4*(0.189207 * (0.210357*t + t**2))))
; /.378414
;Maximum deviation identified with CPMPPER1 0.006450400%
;X-Y R-A Plan
; 0.276292993 ***
; 0.910570095 ***
; 0.951564877 ***
; 0.294599307 ***
;PERE10
; Is, Delta, %
; 3.999741984 ***
;-0.000258016 ***
;-0.006450400 ***
;
X>Y?
X<>Y
X=0?
GTO 04
STO 07 ;b in 07
X<>Y
STO 08 ;a in 08 and now is a bigger than b
RAD
2
SQRT
PI
/
CHS
0.5
+
STO 22 ;secure reuse param 1/2 - SQRT(2)/pi
0.00000001 ; search for t
0.99999999
"ZWFZT"
ASTO 06 ; in case of use of SOL from MATH module
XEQ "SOLVE" ;solve from Advantage
PI
*
COS
CHS
1
+
RCL 22
*
CHS
1
+
1/X
RCL 07
X^2
RCL 08
X^2
+
SQRT
*
4
*
RTN
LBL "ZWFZT" ;calulating the t for the atan(b/a) angle
STO 23 ;secure parameter t
PI
*
SIN
RCL 22
*
CHS
STO 24 ;temporary storage
RCL 23 ;t
1.04508
*
0.354484
+
X^2
LASTX
X<>Y
RCL 23
0.210357
+
RCL 23
*
0.189207
*
4
*
-
SQRT
-
.378414
/
PI
*
4
/
ST+ 24
RCL 08
RCL 07
/
ATAN
ST+ 24
PI
2
/
ST- 24
RCL 24
RTN
LBL 04
X<>Y
4
*
RTN
END