home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
C-SSP.ARJ
/
CXCOSN.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Text File
|
1984-08-08
|
304 b
|
16 lines
cxcosn(a,r)
/*subroutine finds the cosine of a complex argument*/
float a[],r[];
{
double b,c;
extern double cos(),exp(),sin();
b = exp(a[1]);
c = 1.0/b;
r[0] = cos(a[0]) * (b + c) * 0.5;
r[1] = -sin(a[0]) * (b - c) * 0.5;
}