.\" '\" te .\" to invoke 'tbl', 'eqn', 'pic' in the proper order .\" .\" @(#)cplxtrig.3 1.9 00/03/29 SMI; .\" .TH CPLXTRIG 3CC4 "07 August 1997" .\" .SH NAME cplxtrig \- trigonometric functions in the C++ complex number math library .SH SYNOPSIS .LP .nf .ft B #include .sp .5v class complex { public: friend complex cos(const complex); friend complex sin(const complex); friend complex tan(const complex); .sp .5v friend complex cosh(const complex); friend complex sinh(const complex); friend complex tanh(const complex); .sp .5v friend complex acos(const complex); friend complex asin(const complex); friend complex atan(const complex); ... \fI// remainder not shown here\fB }; .ft R .fi .\" .SH DESCRIPTION .LP These functions are versions of the corresponding floating-point trigonometric math library functions, overloaded for use with complex numbers. .TP .B "complex z = cos(x)" Returns the complex cosine of complex angle \fBx\fR. .TP .B "complex z = sin(x)" Returns the complex sine of complex angle \fBx\fR. .TP .B "complex z = tan(x)" Returns the complex tangent of complex angle \fBx\fR. .TP .B "complex z = cosh(x)" Returns the complex hyperbolic cosine of complex angle \fBx\fR. .TP .B "complex z = sinh(x)" Returns the complex hyperbolic sine of complex angle \fBx\fR. .TP .B "complex z = tanh(x)" Returns the complex hyperbolic tangent of complex angle \fBx\fR. .TP .B "complex z = acos(x)" Returns the complex angle whose cosine is complex \fBx\fR. .TP .B "complex z = asin(x)" Returns the complex angle whose sine is complex \fBx\fR. .TP .B "complex z = atan(x)" Returns the complex angle whose tangent is complex \fBx\fR. .\" .ne 4 .SH "SEE ALSO" .LP .na .BR cplx.intro (3CC4), .BR cartpol (3CC4), .BR cplxerr (3CC4), .BR cplxexp (3CC4), .BR cplxops (3CC4), .BR intro (2), .I C++ Library Reference Chapter 2, "The Complex Arithmetic Library." .\" .TZ ???? .ad .\" .SH DIAGNOSTICS .LP .TP .BR sinh(x) " and " cosh(x) If the imaginary part of \fBx\fR would cause overflow, returns \fB(0,0)\fR. If the real part is large enough to cause overflow, returns a value depending on the sine and cosine of the imaginary part of \fBx\fR: .TS .\"allbox; .\"ccn. .sp .nf 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) .fi .sp .TE In all cases, \fBerrno\fR is set to \fBERANGE\fR (see \fBintro\fR(2)). See also \fBcplxerr\fR(3CC4).