Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cplx.intro(3C++)

cartpol(3C++)

cplxerr(3C++)

cplxexp(3C++)

cplxops(3C++)

intro(2)

CPLXTRIG(3C++)

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(3C++), cartpol(3C++), cplxerr(3C++), cplxexp(3C++), cplxops(3C++), intro(2), Complex Tutorial . 

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(3C++). 
 

SunOS WorkShop_4.2  —  Last change: 24 March 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026