In this section the exponential and logarithmic functions to the natural base e are described, as well as the conversion to the logarithm with respect to any base.
The power series expansions are e^z= the sum from n=0 to infinity of (z^n/n!) and ln(1 + z)= the sum from n=1 to infinity of ( - 1)^(n - 1)(z^n/n). Further information on the Dilog and Polylog functions can be found in Lewin [Lew81].
Given a power series f defined over the real or complex field, return the exponential power series of f.
Given an arbitrary real or complex number c, return the exponential e^c of c. Here c is allowed to be free or of fixed precision, and the result is in the same field as c.
Given a power series f defined over the real or complex field, return the logarithm of f. The valuation of f must be zero.
Given a non-zero free real or complex number c, return the logarithm of c (to the natural base e). The principal value with imaginary part in ( - pi, pi] is chosen. The result will be a free complex number, unless the argument is real and positive, in which case a free real number is returned.The argument is also allowed to be a real or complex number of fixed precision. A fixed precision real argument must be positive, and the result will be real of the same precision. A fixed precision complex argument must be non-zero, and yields a complex value of the same precision.
Given non-negative real numbers b and r, return the logarithm log_b(r) of a to the base b. Here both r and b may be of fixed precision or free. Automatic coercion is applied if necessary.
For given complex s of fixed precision or free real or complex s, this returns the value of the principal branch of the dilogarithm Li_2(s), which can be defined by Li_2(s)=the negative of the integral from 0 to s of (log(1 - s)/s)ds, and forms the analytic continuation of the power series sum from n=1 to infinity of (s^n/n^2), (which is convergent for | s| <= 1). For large values of the argument a functional equation like Li_2((-1/s)) + Li_2( - s)=2Li_2( - 1) - (1/2)log^2(s) should be used.
For an integer m >= 2 and power series f defined over the free real or complex field, return the m-th polylogarithm of the series f. The valuation of f must be positive for m>1.
For given integer m >= 2 and complex s of fixed precision or free real or complex s, this returns the value of the principal branch of the polylogarithm Li_m(s), defined for m >= 3 by Li_m(s)= the integral from 0 to s given by (Li_(m - 1)(s)/s)ds (and for m=2 as the dilogarithm Li_2). Then Li_m is the analytic continuation of the sum from n=1 to infinity of (s^n/n^m), (which is convergent for | s| <= 1). For large values of the argument a functional equation like ( - 1)^m Li_m((-1/s)) + Li_m( - s)= - (1/m!)log^m(s) + 2sum_(r=1)^( Floor(m/2))(log^(m - 2r)(s)/(m - 2r)!)Li_(2r)( - 1) should be used.
Given integer m >= 2 and complex s of fixed precision or free real or complex s, this returns the value of the principal branch of the modified versions tilde D_m, D_m and P_m of the polylogarithm Li_m(s); all of these satisfy functional equations of the form f_m(1/s)=( - 1)^mf_m(s). For their definition and main properties, see Zagier [Zag91].
The trigonometric functions may be computed for real and complex arguments or for power series defined over the real or complex field. The basic power series expansions are sin(z)=the sum from n=0 to infinity of (( - 1)^(n + 1)z^(2n + 1)/(2n + 1)!), and cos(z)=the sum from n=0 to infinity of (( - 1)^nz^(2n)/(2n)!). Euler's formulas relate these with the exponential functions via sin(z)=(e^(i z) - e^(-i z)/2i), cos(z)=(e^(i z) + e^(-i z)/2).
Given a power series f defined over the real or complex field, return the power series sin(f).
Given a real or complex number c, return the value sin(c).
Given a power series f defined over the real or complex field, return the power series cos(f).
Given a real or complex number c, return the value cos(c).
Given a power series f defined over the real or complex field, return the two power series sin(f) and cos(f).
Given a free real or complex number s, return the two values sin(s) and cos(s). This function is not implemented for fixed precision reals or complexes.
Given a power series f defined over the real or complex field, return the power series tan(f).
Given a real or complex number c, return the value tan(c)=(sin(c)/cos(c)). Note that c should not be too close to one of the zeroes (pi/2 + n .pi) of cos(z).
Given a power series f defined over the real or complex field having valuation zero, return the power series cot(f).
Given a real or complex number c, return the value cot(c)=(cos(c)/sin(c)). Note that c should not be too close to one of the zeroes n .pi of sin(z).
Given a power series f defined over the real or complex field, return the power series sec(f).
Given a real or complex number c, return the value sec(c)=1/cos(c). Note that c should not be too close to one of the zeroes (pi/2 + n .pi) of cos(z).
Given a power series f defined over the real or complex field having valuation zero, return the power series cosec(f).
Given a real or complex number c, return the value cosec(c)=1/sin(c). Note that c should not be too close to one of the zeroes n .pi of sin(z).
The inverse trigonometric functions are all available for arbitrary free (real or complex) argument, as well as for restricted real arguments of fixed precision. The principal values are chosen as indicated.
We mention the power series expansions for the inverse of the sine and tangent functions (for | z| <= 1): eqalign( arcsin(z)&=sum_(n=0)^Infinity bigl(prod_(k=1)^(2n) k^(( - 1)^(k - 1))bigr)(z^(2n + 1)/2n + 1), cr arctan(z)&=sum_(n=1)^Infinity( - 1)^n(z^(2n + 1)/2n + 1).cr) The important relations with the logarithmic function include eqalign( arcsin(z)&=(1/i)log(i z + Sqrt(1 - z^2)), cr arccos(z)&=(1/i)log(z + Sqrt(z^2 - 1)), cr arctan(z)&=(1/2i)log((1 + i z/1 - i z)).cr)
Given a power series f defined over the real or complex field. return the inverse sine of the power series f.
Given an arbitrary free real or complex number s, return a value t such that sin(t)=s. The principal value with real part in [ - pi/2, pi/2] is chosen. The return value is a free complex number, unless s is real and -1 <= s <= 1, in which case a free real number is returned.The argument s is also allowed to be a fixed precision real number satisfying -1 <= s <= 1; the fixed precision real value returned will again be in the interval [ - pi/2, pi/2].
Given a power series f defined over the real or complex field. return the inverse cosine of the power series f.
Given an arbitrary free real or complex number s, return a value t such that cos(t)=s. The principal value with real part in [0, pi] is chosen. The return value is a free complex number, unless s is real and -1 <= s <= 1, in which case a free real number is returned.The argument s is also allowed to be a fixed precision real number satisfying -1 <= s <= 1; the fixed precision real value returned will again be in the interval [0, pi].
Given a power series f defined over the real or complex field, return the inverse tangent of the power series f.
Given an arbitrary free real or complex number s, return a value t such that tan(t)=s. The principal value with real part in ( - pi/2, pi/2) is chosen. The return value is a free complex number, unless s is real, in which case a free real number is returned.The argument s is also allowed to be a fixed precision real number; the fixed precision real value returned will again be in the interval [ - pi/2, pi/2).
Given the real numbers a and b, return the value v of arctan(a/b) determined by the choice of signs for a and b. That is, the value v is chosen in ( - pi, pi) in such a way that the signs of a and sin(v) coincide, as well as the signs of b and cos(v). An error occurs if a and b are both zero; if b is zero and a non-zero, the value returned is sign(a) .pi/2.The arguments are allowed to be in any real field (automatic coercion is used whenever necessary).
Given an arbitrary free real or complex number s, return a value t such that cot(t)=s. The principal value with real part in ( - pi/2, pi/2) is chosen. The return value is a free complex number, unless s is real, in which case a free real number is returned.The argument s is also allowed to be a fixed precision real number; the fixed precision real value returned will again be in the interval [ - pi/2, pi/2).
Given an arbitrary free real or complex number s, return a value t such that sec(t)=s. The principal value with real part in [0, pi/2)union(pi/2, pi] is chosen. The return value is a free complex number, unless s is real, in which case a free real number is returned.The argument s is also allowed to be a fixed precision real number; the fixed precision real value returned will again be between 0 and pi.
Given an arbitrary free real or complex number s, return a value t such that cosec(t)=s. The principal value with real part in [ - pi/2, 0)union(0, pi/2] is chosen. The return value is a free complex number, unless s is real, in which case a free real number is returned.The argument s is also allowed to be a fixed precision real number; the fixed precision real value returned will again be between -pi/2 and pi/2.
The hyperbolic functions are available for arbitrary free (real and complex) arguments, and certain fixed precision real arguments, as specified below.
The hyperbolic functions are defined using eqalign( sinh(z)&=(e^z - e^(-z)/2), cr cosh(z)&=(e^z + e^(-z)/2).cr)
Given a power series f defined over the real or complex field, return the hyperbolic sine of the power series f.
Given an arbitrary free real or complex number s, return sinh(s). The result will be a free real or complex value, in accordance with the argument.The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.
Given a power series f defined over the real or complex field, return the hyperbolic cosine of the power series f.
Given an arbitrary free real or complex number s, return cosh(s). The result will be a free real or complex value, in accordance with the argument.The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.
Given a power series f defined over the real or complex field, return the hyperbolic tangent of the power series f.
Given an arbitrary free real or complex number s, return tanh(s)=(sinh(s) /cosh(s)). The result will be a free real or complex value, in accordance with the argument.The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.
Given an arbitrary free real or complex number s, return coth(s)=(cosh(s) /sinh(s)). The result will be a free real or complex value, in accordance with the argument.The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.
Given an arbitrary free real or complex number s, return sech(s)=1/cosh(s). The result will be a free real or complex value, in accordance with the argument.The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.
Given an arbitrary free real or complex number s, return cosech(s)=1/sinh(s). The result will be a free real or complex value, in accordance with the argument.The argument s is also allowed to be a fixed precision real number, in which case the result will be a real number of the same fixed precision.
The inverse hyperbolic functions are available for arbitrary free (real or complex) argument, as well as for restricted real arguments of fixed precision. The principal values are chosen as indicated.
Given a power series f defined over the real or complex field, return the inverse hyperbolic sine of the power series f.
Given an arbitrary free real or complex number s, return t such that sinh(t)=s; the principal value with imaginary part in [ - pi/2, pi/2] is chosen. The return value is a free complex number, unless the argument is real, in which case a free real number is returned.The argument s is also allowed to be a real number of fixed precision; a real number of the same precision will be returned.
Given a power series f defined over the real or complex field, return the inverse hyperbolic cosine of the power series f.
Given an arbitrary free real or complex number s, return t such that cosh(t))=s; the principal value with imaginary part in [0, pi] is chosen. The return value is a free complex number, unless the argument is real and s >= 1, in which case a free real number is returned.The argument s is also allowed to be a real number of fixed precision greater than or equal to 1; a real number of the same precision will be returned.
Given a power series f defined over the real or complex field, return the inverse hyperbolic tangent of the power series f.
Given an arbitrary free real or complex number s, return t such that tanh(t)=s; the principal value with imaginary part in [ - pi/2, pi/2] is chosen. The return value is a free complex number, unless the argument is real and -1<s<1, in which case a free real number is returned.The argument s is also allowed to be a real number of fixed precision with -1< s< 1; a real number of the same precision will be returned.
Given an arbitrary free real or complex number s, return t such that sech(t))=s; the principal value with imaginary part in [0, pi] is chosen. The return value is a free complex number, unless the argument is real and | s| >= 1, in which case a free real number i s returned.The argument s is also allowed to be a real number of fixed precision with | s| >= 1; a real number of the same precision will be returned.
Given an arbitrary free real or complex number s, return t such that cosech(t))=s; the principal value with imaginary part in [ - pi/2, pi/2] is chosen. The return value is a free complex number, unless the argument is real, in which case a free real number is returned.The argument s is also allowed to be a real number of fixed precision; a real number of the same precision will be returned.
Given an arbitrary free real or complex number s, return t such that coth(t))=s; the principal value with imaginary part in [ - pi/2, pi/2] is chosen. The return value is a free complex number, unless the argument is real and 0<s <= 1, in which case a free real number is returned.[Next][Prev] [Right] [Left] [Up] [Index] [Root]The argument s is also allowed to be a real number of fixed precision with 0<s <= 1; a real number of the same precision will be returned.