2.4 Mathematical functions

Here is a list of the mathematical functions, wich are included in the mathexpressions package. The get_latex function raise an error if the expression contains a not supported function.

Function Explanation Useable in LaTeX
abs(x) Return the absolute value of x
acos(x) Return the arc cosine of x, in radians
acosh(x) Return the inverse hyperbolic cosine of x
asin(x) Return the arc sine of x, in radians
asinh(x) Return the inverse hyperbolic sine of x
atan(x) Return the arc tangent of x, in radians
atan2(x) Return atan(y / x), in radians. The result is between -pi and pi. The vector in the plane from the origin to point (x, y) makes this angle with the positive X axis. The point of atan2() is that the signs of both inputs are known to it, so it can compute the correct quadrant for the angle. For example, atan(1) and atan2(1, 1) are both pi/4, but atan2(-1, -1) is -3*pi/4.
atanh(x) Return the inverse hyperbolic tangent of x
ceil(x) Return the ceiling of x as a float, the smallest integer value greater than or equal to x
copysign(x, y) Return x with the sign of y. On a platform that supports signed zeros, copysign(1.0, -0.0) returns -1.0
cos(x) Return the cosine of x radians
cosh(x) Return the hyperbolic cosine of x
degrees(x) Converts angle x from radians to degrees
erf(x) Return the error function at x
erfc(x) Return the complementary error function at x
exp(x) Return e^x
expm1(x) Return e^x - 1. For small floats x, the subtraction in exp(x) - 1 can result in a significant loss of precision; the expm1() function provides a way to compute this quantity to full precision
factorial(x) Return x factorial. Raises ValueError if x is not integral or is negative
floor(x) Return the floor of x as a float, the largest integer value less than or equal to x
fmod(x, y) More precise then x%y
gamma(x) Return the Gamma function at x
hypot(x, y) Return the Euclidean norm, sqrt(x*x + y*y). This is the length of the vector from the origin to point (x, y)
ldexp(x) Return x*(2^i). This is essentially the inverse of function frexp()
lgamma(x) Return the natural logarithm of the absolute value of the Gamma function at x
log(x) Return the natural logarithm of x (to base e)
log10(x) Return the base-10 logarithm of x. This is usually more accurate than logn(x, 10)
logn(x, n) Return the logarithm of x to the base n
pow(x, y) Return x raised to the power y
radians(x) Converts angle x from degrees to radians
random(x) Return a random number beetween zero and x
round(x) Return x rounded to a natural number
roundn(x, n) Return x rounded to n digits after the decimal point
sin(x) Return the sine of x radians
sinh(x) Return the hyperbolic sine of x
sqrt(x) Return the square root of x
tan(x) Return the tangent of x radians
tanh(x) Return the hyperbolic tangent of x

All the functionnames and their explanations are from the Python Software Foundation.