MtPy - Advanced math functions with Python.
Other
- Real numbers functions
ceil(x)
  Return the ceiling of x, the smallest integer greater than or equal to x.copysing(x,y)
  Return a float with the magnitude (absolute value) of x but the sign of y.fabs(x)
  Return the absolute value of x.factorial(x)
  Return x factorial. Raises ValueError if x is not integral or is negative.floor(x)
  Return the floor of x, the largest integer less than or equal to x.fmod(x,y)
  Returnfmod(x, y)
, as defined by the platform C library. Note that the Python expressionx % y
may not return the same result. The intent of the C standard is thatfmod(x, y)
be exactly (mathematically; to infinite precision) equal tox - n*y
for some integer n such that the result has the same sign as x and magnitude less thanabs(y)
.frexp(x)
  Return the mantissa and exponent of x as the pair(m, e)
.m
is a float and e is an integer such thatx == m * 2**e
exactlyfsum(itinerable)
  Return an accurate floating point sum of values in the iterable.gcd(a,b)
  Return the greatest common divisor of the integers a and b.isclose(a,b,rel_tol=1e-09, abs_tol=0.0)
  Return True if the values a and b are close to each other and False otherwise. Whether or not two values are considered close is determined according to given absolute and relative tolerances.isfinite(x)
  Return True if x is neither an infinity nor a NaN, and False otherwise.isinf(x)
  Return True if x is a positive or negative infinity, and False otherwise.isnan(x)
  Return True if x is a NaN (not a number), and False otherwise.ldexp(x,i)
  Return x * (2**i). This is essentially the inverse of function frexp().modF(x)
  Return the fractional and integer parts of x. Both results carry the sign of x and are floats.trunc(x)
  Return the Real value x truncated to an Integral (usually an integer).exp(x)
  Returne**x.
expm1(x)
  Returne**x - 1.
log(x)
  With one argument, return the natural logarithm of x (to base e).log1p(x)
  Return the natural logarithm of1+x
(base e).log2(x)
  Return the base-2 logarithm of x.log10(x)
  Return the base-10 logarithm of x.power(x,y)
  Return x raised to the power y.sqrt(x)
  Return the square root of x.erf(x)
  Return the error function at x.erfrc(x)
  Return the complementary error function at x.gamma(x)
  Return the Gamma function at x.lgamma(x)
  Return the natural logarithm of the absolute value of the Gamma function at x.hypot(x,y)
  Return the Euclidean norm,sqrt(x*x + y*y)
.deg(x)
  Convert angle x from radians to degrees.rad(x)
  Convert angle x from degrees to radians.
Complex numbers functions
Note that all the following functions are mathematical functions for complex numbers.
- phase(x)
  Return the phase of x (also known as the argument of x), as a float. - polar(x)
  Return the representation of x in polar coordinates. Returns a pair (r, phi) where r is the modulus of x and phi is the phase of x. - rect(r,phi)
  Return the complex number x with polar coordinates r and phi. - exp(x)
  Return the exponential valuee**x
. - log(x)
  Returns the logarithm of x to the given base. - log10(x)
  Return the base-10 logarithm of x. - sqrt(x)
  Return the square root of x. - isinf(x)
  Return True if the real or the imaginary part of x is positive or negative infinity. - isnan(x)
  Return True if the real or imaginary part of x is not a number.
- phase(x)