manpagez: man pages & more
info cln
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.8.1 Exponential and logarithmic functions

cl_R exp (const cl_R& x)
cl_N exp (const cl_N& x)

Returns the exponential function of x. This is e^x where e is the base of the natural logarithms. The range of the result is the entire complex plane excluding 0.

cl_R ln (const cl_R& x)

x must be > 0. Returns the (natural) logarithm of x.

cl_N log (const cl_N& x)

Returns the (natural) logarithm of x. If x is real and positive, this is ln(x). In general, log(x) = log(abs(x)) + i*phase(x). The range of the result is the strip in the complex plane -pi < imagpart(log(x)) <= pi.

cl_R phase (const cl_N& x)

Returns the angle part of x in its polar representation as a complex number. That is, phase(x) = atan(realpart(x),imagpart(x)). This is also the imaginary part of log(x). The range of the result is the interval -pi < phase(x) <= pi. The result will be an exact number only if zerop(x) or if x is real and positive.

cl_R log (const cl_R& a, const cl_R& b)

a and b must be > 0. Returns the logarithm of a with respect to base b. log(a,b) = ln(a)/ln(b). The result can be exact only if a = 1 or if a and b are both rational.

cl_N log (const cl_N& a, const cl_N& b)

Returns the logarithm of a with respect to base b. log(a,b) = log(a)/log(b).

cl_N expt (const cl_N& x, const cl_N& y)

Exponentiation: Returns x^y = exp(y*log(x)).

The constant e = exp(1) = 2.71828… is returned by the following functions:

cl_F exp1 (float_format_t f)

Returns e as a float of format f.

cl_F exp1 (const cl_F& y)

Returns e in the float format of y.

cl_F exp1 (void)

Returns e as a float of format default_float_format.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on August 27, 2013 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.