NAME
cplxtrig - trigonometric functions in the C++ complex number
math library
SYNOPSIS
#include <complex.h>
class complex {
public:
friend complex cos(const complex);
friend complex sin(const complex);
friend complex tan(const complex);
friend complex cosh(const complex);
friend complex sinh(const complex);
friend complex tanh(const complex);
friend complex acos(const complex);
friend complex asin(const complex);
friend complex atan(const complex);
... // remainder not shown here
};
DESCRIPTION
These functions are versions of the corresponding floating-
point trigonometric math library functions, overloaded for
use with complex numbers.
complex z = cos(x)
Returns the complex cosine of complex angle x.
complex z = sin(x)
Returns the complex sine of complex angle x.
complex z = tan(x)
Returns the complex tangent of complex angle x.
complex z = cosh(x)
Returns the complex hyperbolic cosine of complex angle
x.
complex z = sinh(x)
Returns the complex hyperbolic sine of complex angle x.
complex z = tanh(x)
Returns the complex hyperbolic tangent of complex angle
x.
complex z = acos(x)
Returns the complex angle whose cosine is complex x.
complex z = asin(x)
Returns the complex angle whose sine is complex x.
complex z = atan(x)
Returns the complex angle whose tangent is complex x.
SEE ALSO
cplx.intro(3CC4), cartpol(3CC4), cplxerr(3CC4),
cplxexp(3CC4), cplxops(3CC4), intro(2), C++ Library Refer-
ence Chapter 2, "The Complex Arithmetic Library."
DIAGNOSTICS
sinh(x) and cosh(x)
If the imaginary part of x would cause overflow,
returns (0,0). If the real part is large enough to
cause overflow, returns a value depending on the sine
and cosine of the imaginary part of x:
x.imag() x.imag() returned value
sin>=0 cos>=0 (HUGE_VAL, HUGE_VAL)
sin< 0 cos>=0 (HUGE_VAL, -HUGE_VAL)
sin>=0 cos< 0 (-HUGE_VAL, HUGE_VAL)
sin< 0 cos< 0 (-HUGE_VAL, -HUGE_VAL)
In all cases, errno is set to ERANGE (see intro(2)).
See also cplxerr(3CC4).