Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

CPLX.INTRO(3C++)

cplxerr(3C++)

cplxops(3C++)

cplxexp(3C++)

cplxtrig(3C++)

CARTPOL(3C++)  —  C++ Complex Math Library

NAME

cartesian/polar − functions for the C++ Complex Math Library

SYNOPSIS

#include <complex.h>


class complex {
 public:
 
friend doubleabs(complex);
friend doublearg(complex);
friend complexconj(complex);
friend doubleimag(complex);
friend doublenorm(complex);
friend complexpolar(double, double = 0);
friend doublereal(complex);
};

DESCRIPTION

The following functions are defined for complex, where:
 — d, m, and a are of type integer and
 — x and y are of type complex. 

d = abs(x) Returns the absolute value or magnitude of x. 

d = norm(x) Returns the square of the magnitude of x.  It is faster than abs, but more likely to cause an overflow error.  It is intended for comparison of magnitudes. 

d = arg(x) Returns the angle of x, measured in radians in the range −π to π. 

y = conj(x) Returns the conjugation of x.  That is, if x is (real, imag), then conj(x) is (real, −imag). 

y = polar(m, a)
Creates a complex given a pair of polar coordinates, magnitude m, and angle a, measured in radians in the range −π to π. 

d = real(x) Returns the real part of x. 

d = imag(x) Returns the imaginary part of x. 

SEE ALSO

CPLX.INTRO(3C++), cplxerr(3C++), cplxops(3C++), cplxexp(3C++), and cplxtrig(3C++). 

Sun Microsystems  —  Last change: 14 July 1989

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