beautypg.com

Trigonometric functions, Transcendental functions – HP Integrity NonStop H-Series User Manual

Page 238

background image

cout << com_four << " in polar coordinates is "
<< arg(com_four) << " and " << norm(com_four) << endl;

Trigonometric Functions

The trigonometric functions defined for floating point values (namely, sin(), cos(), tan(), asin(),
acos(), atan(), sinh(), cosh(), and tanh()), have all been extended to complex number arguments.
Each takes a single complex number as argument and returns a complex number as result. The
function atan2() takes two complex number arguments, or a complex number and a real value (in
either order), and returns a complex number result.

Transcendental Functions

The transcendental functions exp(), log(), log10() and sqrt() have been extended to complex
arguments. Each takes a single complex number as argument, and returns a complex number as
result.

The standard library defines several variations of the exponential function pow(). Versions exist to
raise a complex number to an integer power, to raise a complex number to a complex power or to a
real power, or to raise a real value to a complex power.

This manual is related to the following products: