Post Reply 
Arctangent function program [HP-42S, Free42]
09-19-2024, 04:25 AM
Post: #25
RE: Arctangent function program [HP-42S, Free42]
This program for HP-42S calculates \(\sin(x)\) and \(\cos(x)\) based on \(\tan(\frac{x}{2})\):
Code:
00 { 63-Byte Prgm }
01 2
02 X<>Y
03 ÷
04 STO 01
05 STO 02
06 8
07 STO 00
08 1
09 STO 04
10 STO 05
11 CLX
12 STO 03
13 STO 06
14▸LBL 00
15 RCL 01
16 RCL 02
17 STO 01
18 2
19 ×
20 +
21 +/-
22 STO 02
23 RCL 04
24 RCL 03
25 STO 04
26 RCL 01
27 ×
28 +
29 STO 03
30 RCL 06
31 RCL 05
32 STO 06
33 RCL 01
34 ×
35 +
36 STO 05
37 DSE 00
38 GTO 00
39 ÷
40 ENTER
41 +
42 LASTX
43 ENTER
44 ×
45 1
46 X<>Y
47 -
48 1
49 LASTX
50 +
51 ÷
52 X<>Y
53 LASTX
54 ÷
55 X<>Y
56 END

Hitting the [÷] button calculates \(\tan(x)\).

Example

1 R/S

y: 0.8414709848078965065362209309116153
x: 0.54030230586813971758203414358187

÷

x: 1.557407724654902229769750316481308
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Arctangent function program [HP-42S, Free42] - Thomas Klemm - 09-19-2024 04:25 AM



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