.. seq:module:: ..math :seq:mod:`..math` ----------------- Source code: `math.seq `_ .. seq:data:: e .. seq:data:: pi .. seq:data:: tau .. seq:data:: inf .. seq:data:: nan .. seq:function:: factorial(x : int) .. seq:function:: isnan(x : float) isnan(float) -> bool Return True if float arg is a NaN, else False. .. seq:function:: isinf(x : float) isinf(float) -> bool: Return True if float arg is an INF, else False. .. seq:function:: isfinite(x : float) isfinite(float) -> bool Return True if x is neither an infinity nor a NaN, and False otherwise. .. seq:function:: ceil(x : float) ceil(float) -> float Return the ceiling of x as an Integral. This is the smallest integer >= x. .. seq:function:: floor(x : float) floor(float) -> float Return the floor of x as an Integral. This is the largest integer <= x. .. seq:function:: fabs(x : float) fabs(float) -> float Returns the absolute value of a floating point number. .. seq:function:: fmod(x : float, y : float) fmod(float, float) -> float Returns the remainder of x divided by y. .. seq:function:: exp(x : float) exp(float) -> float Returns the value of e raised to the xth power. .. seq:function:: expm1(x : float) expm1(float) -> float Return e raised to the power x, minus 1. expm1 provides a way to compute this quantity to full precision. .. seq:function:: ldexp(x : float, i : int) ldexp(float, int) -> float Returns x multiplied by 2 raised to the power of exponent. .. seq:function:: log(x : float) log(float) -> float Returns the natural logarithm (base-e logarithm) of x. .. seq:function:: log2(x : float) log2(float) -> float Return the base-2 logarithm of x. .. seq:function:: log10(x : float) log10(float) -> float Returns the common logarithm (base-10 logarithm) of x. .. seq:function:: degrees(x : float) degrees(float) -> float Convert angle x from radians to degrees. .. seq:function:: radians(x : float) radians(float) -> float Convert angle x from degrees to radians. .. seq:function:: sqrt(x : float) sqrt(float) -> float Returns the square root of x. .. seq:function:: pow(x : float, y : float) pow(float, float) -> float Returns x raised to the power of y. .. seq:function:: acos(x : float) acos(float) -> float Returns the arc cosine of x in radians. .. seq:function:: asin(x : float) asin(float) -> float Returns the arc sine of x in radians. .. seq:function:: atan(x : float) atan(float) -> float Returns the arc tangent of x in radians. .. seq:function:: atan2(y : float, x : float) atan2(float, float) -> float Returns the arc tangent in radians of y/x based on the signs of both values to determine the correct quadrant. .. seq:function:: cos(x : float) cos(float) -> float Returns the cosine of a radian angle x. .. seq:function:: sin(x : float) sin(float) -> float Returns the sine of a radian angle x. .. seq:function:: hypot(x : float, y : float) hypot(float, float) -> float Return the Euclidean norm. This is the length of the vector from the origin to point (x, y). .. seq:function:: tan(x : float) tan(float) -> float Return the tangent of a radian angle x. .. seq:function:: cosh(x : float) cosh(float) -> float Returns the hyperbolic cosine of x. .. seq:function:: sinh(x : float) sinh(float) -> float Returns the hyperbolic sine of x. .. seq:function:: tanh(x : float) tanh(float) -> float Returns the hyperbolic tangent of x. .. seq:function:: acosh(x : float) acosh(float) -> float Return the inverse hyperbolic cosine of x. .. seq:function:: asinh(x : float) asinh(float) -> float Return the inverse hyperbolic sine of x. .. seq:function:: atanh(x : float) atanh(float) -> float Return the inverse hyperbolic tangent of x. .. seq:function:: copysign(x : float, y : float) copysign(float, float) -> float Return a float with the magnitude (absolute value) of x but the sign of y. .. seq:function:: log1p(x : float) log1p(float) -> float Return the natural logarithm of 1+x (base e). .. seq:function:: trunc(x : float) trunc(float) -> float Return the Real value x truncated to an Integral (usually an integer). .. seq:function:: erf(x : float) erf(float) -> float Return the error function at x. .. seq:function:: erfc(x : float) erfc(float) -> float Return the complementary error function at x. .. seq:function:: gamma(x : float) gamma(float) -> float Return the Gamma function at x. .. seq:function:: lgamma(x : float) lgamma(float) -> float Return the natural logarithm of the absolute value of the Gamma function at x. .. seq:function:: remainder(x : float, y : float) remainder(float, float) -> float Return the IEEE 754-style remainder of x with respect to y. For finite x and finite nonzero y, this is the difference x - n*y, where n is the closest integer to the exact value of the quotient x / y. If x / y is exactly halfway between two consecutive integers, the nearest even integer is used for n. .. seq:function:: gcd(a : float, b : float) gcd(float, float) -> float returns greatest common divisor of x and y. .. seq:function:: frexp(x : float) frexp(float) -> Tuple[float, int] The returned value is the mantissa and the integer pointed to by exponent is the exponent. The resultant value is x = mantissa * 2 ^ exponent. .. seq:function:: modf(x : float) modf(float) -> Tuple[float, float] The returned value is the fraction component (part after the decimal), and sets integer to the integer component. .. seq:function:: isclose(a : float, b : float) isclose(float, float) -> bool Return True if a is close in value to b, and False otherwise. For the values to be considered close, the difference between them must be smaller than at least one of the tolerances. Unlike python, rel_tol and abs_tol are set to default for now.