Add README.md
[pdp8.git] / sw / f4 / FRTSRC / csin.ra
CommitLineData
7af5ad59
PH
1/
2/ C S I N
3/ - - - -
4/
5/ VERSION 5A 4-27-77 PT
6/
7/COMPLEX SIN AND COS ROUTINE
8/
9/CCOS(X+I*Y)=COS(X)*COSH(Y)-SIN(X)*SINH(Y)
10/
11/CSIN(X+I*Y)=SIN(X)*COSH(Y)+COS(X)*SINH(Y)
12/
13/CALLS SIN,COS,COSH,SINH
14/
15 SECT CSIN
16 JA #CSIN
17 DPCHK
18 TEXT +CSIN +
19CSINXR, SETX XR
20 SETB BP
21 JA .+3
22BP, F 0.0
23XR, F 0.0
24ARG, F 0.0
25 F 0.0
26C, F 0.0
27CH, F 0.0
28S, F 0.0
29 ORG 10*3+BP
30 FNOP
31 JA CSINXR
32 0
33
34RT, JA .
35SH, F 0.0
36 BASE 0
37#CSIN, SETX XR
38 LDX 0,0
39COM, STARTD
40 FLDA 10*3
41 FSTA RT
42 FLDA 0
43 SETB BP
44 BASE BP
45 LDX 1,1
46 FSTA BP
47 FLDA% BP,1
48 FSTA BP
49 STARTE
50 FLDA% BP
51 FSTA ARG
52 STARTF
53 EXTERN COS
54 JSR COS
55 JA CSA
56 JA ARG /COS(X)
57CSA, FSTA C
58 EXTERN SIN
59 JSR SIN
60 JA CSB
61 JA ARG
62CSB, FSTA S /SIN(X)
63 EXTERN SINH
64 JSR SINH
65 JA CSC
66 JA ARG+3
67CSC, FSTA SH /SINH(Y)
68 EXTERN COSH
69 JSR COSH
70 JA CSD
71 JA ARG+3
72CSD, FSTA CH /COSH(Y)
73/XR0 IS 0 FOR CSIN AND 1 FOR CCOS
74 JXN CALCOS,0
75 FLDA S
76 FMUL CH
77 FSTA ARG /SIN*COSH
78 FLDA C
79CSE, FMUL SH
80 FSTA ARG+3 /COS*SINH
81 STARTE
82 FLDA ARG
83 FSTA #CAC
84 JA RT
85 EXTERN #CAC
86/DO COS
87/
88CALCOS, FLDA C
89 FMUL CH
90 FSTA ARG
91 FLDA S
92 FNEG
93 JA CSE
94 ENTRY CCOS
95CCOS, SETX XR
96 LDX 1,0
97 JA COM
98\f