前页 | 后页 |
ctan
Complex circular tangent.SYNOPSIS:
void ctan();
cmplx z, w;
ctan(&z, &w);
DESCRIPTION:
If
z = x + iy,
then
sin 2x + i sinh 2y
w = --------------------.
cos 2x + cosh 2y
On the real axis the denominator is zero at odd multiples of PI/2. The denominator is evaluated by its Taylor series near these points.
ACCURACY:
Relative error:
arithmetic domain # trials peak rms
DEC -10,+10 5200 7.1e-17 1.6e-17
IEEE -10,+10 30000 7.2e-16 1.2e-16
Also tested by ctan * ccot = 1 and catan(ctan(z)) = z.