·  Home
+   man pages
 -> Linux -> FreeBSD -> OpenBSD -> NetBSD -> Tru64 Unix -> HP-UX 11i -> IRIX
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

man pages->IRIX man pages -> c++/cartpol (3)
 Title
 Content
 Arch
 Section All Sections 1 - General Commands 2 - System Calls 3 - Subroutines 4 - Special Files 5 - File Formats 6 - Games 7 - Macros and Conventions 8 - Maintenance Commands 9 - Kernel Interface n - New Commands

### Contents

```
CARTPOL(3C++)							 CARTPOL(3C++)

```

### NAME[Toc][Back]

```     polar - functions for the C++ Complex Math	Library
```

### SYNOPSIS[Toc][Back]

```     #include <complex.h>

class complex {

public:

friend double  abs(complex);
friend double  arg(complex);
friend complex conj(complex);
friend double  imag(complex);
friend double  norm(complex);
friend complex polar(double, double = 0);
friend double  real(complex);
};
```

### DESCRIPTION[Toc][Back]

```     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 <b>= abs(x<b>)	    Returns the	absolute value or magnitude of x.

d <b>= norm(x<b>)    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 <b>= arg(x<b>)	    Returns the	angle of x, measured in	radians	in the range
-J to J.

y <b>= conj(x<b>)    Returns the	complex	conjugate of x.	 That is, if x is
(real, imag), then conj(x<b>) is (real, -imag).

y <b>= polar(m<b>, a<b>)
Creates a complex given a pair of polar coordinates,
magnitude m, and angle a, measured in radians.

d <b>= real(x<b>)    Returns the	real part of x.

d <b>= imag(x<b>)    Returns the	imaginary part of x.
```

```     complex(3C++), cplxerr(3C++), cplxops(3C++), cplxexp(3C++), and