Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

complex(3C++)

cartpol(3C++)

complex_error(3C++)

cplxops(3C++)

cplxtrig(3C++)






       cplxexp(3C++)                                          cplxexp(3C++)


       NAME
             cplxexp: exp, log, pow, sqrt - exponential, logarithm, power,
             square root functions

       SYNOPSIS
             #include <complex.h>
             class complex {

             public:
                   friend complex    exp(complex);
                   friend complex    log(complex);
                   friend complex    pow(double, complex);
                   friend complex    pow(complex, int);
                   friend complex    pow(complex, double);
                   friend complex    pow(complex, complex);
                   friend complex    sqrt(complex);
             };

       DESCRIPTION
             The following math functions are overloaded by the complex
             library, where:
              - x, y, and z are of type complex.

             z = exp(x)     Returns ex.

             z = log(x)     Returns the natural logarithm of x.

             z = pow(x, y)  Returns xy.

             z = sqrt(x)    Returns the square root of x, contained in the
                            first or fourth quadrants of the complex plane.

       REFERENCES
             complex(3C++), cartpol(3C++), complex_error(3C++),
             cplxops(3C++), cplxtrig(3C++).

       DIAGNOSTICS
             exp returns (0, 0) when the real part of x is so small, or the
             imaginary part is so large, as to cause overflow.  When the
             real part is large enough to cause overflow, exp returns
             (HUGE, HUGE) if the cosine and sine of the imaginary part of x
             are positive, (HUGE, -HUGE) if the cosine is positive and the
             sine is not, (-HUGE, HUGE) if the sine is positive and the
             cosine is not, and (-HUGE, -HUGE) if neither sine nor cosine
             is positive.  In all these cases, errno is set to ERANGE.



                           Copyright 1994 Novell, Inc.               Page 1













      cplxexp(3C++)                                          cplxexp(3C++)


            log returns (-HUGE, 0) and sets errno to EDOM when x is (0,
            0).

            These error-handling procedures may be changed with the
            function complex_error(3C++).











































                          Copyright 1994 Novell, Inc.               Page 2








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