[ << ] | [ < ] | [ 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 ise^x
wheree
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 isln(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 oflog(x)
. The range of the result is the interval-pi < phase(x) <= pi
. The result will be an exact number only ifzerop(x)
or ifx
is real and positive. cl_R log (const cl_R& a, const cl_R& b)
a
andb
must be > 0. Returns the logarithm ofa
with respect to baseb
.log(a,b) = ln(a)/ln(b)
. The result can be exact only ifa = 1
or ifa
andb
are both rational.cl_N log (const cl_N& a, const cl_N& b)
Returns the logarithm of
a
with respect to baseb
.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.