

You can also see documentation and all the help associated with a keyword by passing that keyword as an argument to help function. This is all for help utility opened in the console when you run help() function without any arguments. It provides access to the mathematicalThis help utility can be closed by simply typing following commands.
The Spyder3 editor is used to create and run the Python script. In this article, we will teach you about Python numbers, conversion of one data type into another data type, and arithmetic operations. Represent one such abstraction where complex formulas are stored inside a function.These functions cannot be used with complex numbers use the functions of thePython provides a variety of numbers and arithmetic operations for this purpose.
Ceil ( x ) Return the ceiling of x as a float, the smallest integer value greater than orReturn x with the sign of y. Except when explicitlyNoted otherwise, all return values are floats.Number-theoretic and representation functions: math. Receiving an exceptionInstead of a complex result allows earlier detection of the unexpected complexNumber used as a parameter, so that the programmer can determine how and why itThe following functions are provided by this module. The distinction between functions which support complex numbers andThose which don’t is made since most users do not want to learn quite as muchMathematics as required to understand complex numbers. Floating point support required for this module.Same name from the cmath module if you require support for complexNumbers. Availability: not available on WiPy.
Raises ValueError if x is not integral orReturn the floor of x as a float, the largest integer value less than or equalChanged in version 2.6: Added _floor_() delegation. Factorial ( x )Return x factorial. Fabs ( x ) Return the absolute value of x.

AvoidsLoss of precision by tracking multiple intermediate partial sums. Fsum ( iterable )Return an accurate floating point sum of values in the iterable. This is used to “pickApart” the internal representation of a float in a portable way. If x is zero,Returns (0.0, 0), otherwise 0.5 <= abs(m) < 1. M is a floatAnd e is an integer such that x = m * 2**e exactly.
Nan * 1, returnNew in version 2.6. Operation like but not limited to inf * 0,Inf / inf or any operation involving a NaN, e.g. NaNs are part of theIEEE 754 standards.
Log ( x )Return the logarithm of x to the given base. Delegates to x._trunc_().Note that frexp() and modf() have a different call/return patternThan their C equivalents: they take a single argument and return a pair ofValues, rather than returning their second return value through an ‘outputParameter’ (there is no such thing in Python).For the ceil(), floor(), and modf() functions, note that allFloating-point numbers of sufficiently large magnitude are exact integers.Python floats typically carry no more than 53 bits of precision (the same as thePlatform C double type), in which case any float x with abs(x) >= 2**52Power and logarithmic functions: math. Trunc ( x )Return the Real value x truncated to an Integral (usuallyA long integer). Both results carry the sign ofX, and both are floats. Modf ( x ) Return the fractional and integer parts of x. This is essentially the inverse of functionFrexp().
Exceptional cases followAnnex ‘F’ of the C99 standard as far as possible. Pow ( x, y )Return x raised to the power y. Log10 ( x ) Return the base-10 logarithm of x. TheResult is calculated in a way which is accurate for x near zero.New in version 2.6. Log1p ( x )Return the natural logarithm of 1+x (base e).
Asin ( x ) Return the arc sine of x, in radians. Acos ( x ) Return the arc cosine of x, in radians. Sqrt ( x ) Return the square root of x.Trigonometric functions: math. If both x and y are finite,X is negative, and y is not an integer then pow(x, y)Changed in version 2.6: The outcome of 1**nan and nan**0 was undefined.
This is the length of the vectorFrom the origin to point (x, y). Hypot ( x, y ) Return the Euclidean norm, sqrt(x*x + y*y). Cos ( x ) Return the cosine of x radians. The point of atan2() is that the signs of bothInputs 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. The result is between -pi and pi.The vector in the plane from the origin to point (x, y) makes this angleWith the positive X axis. Atan2 ( y, x ) Return atan(y / x), in radians.
Tanh ( x ) Return the hyperbolic tangent of x.The module also defines two mathematical constants: math. Sinh ( x ) Return the hyperbolic sine of x. Cosh ( x ) Return the hyperbolic cosine of x. Radians ( x ) Converts angle x from degrees to radians.Return the inverse hyperbolic cosine of x.Return the inverse hyperbolic tangent of x.New in version 2.6. Degrees ( x ) Converts angle x from radians to degrees. Tan ( x ) Return the tangent of x radians.Angular conversion: math.
The exception type still depends on thePlatform and libm implementation. For example, whetherMath.log(0) returns -Inf or raises ValueError orOverflowError isn’t defined, and in cases where math.log(0) raisesOverflowError, math.log(0L) may raise ValueError instead.All functions return a quiet NaN if at least one of the args is NaN.Signaling NaNs raise an exception. As a result,The specific exceptions raised in error cases (and even whether someArguments are considered to be exceptional at all) are not defined in anyUseful cross-platform or cross-release way. Behavior in exceptional cases is loosely specifiedBy the C standards, and Python inherits much of its math-functionError-reporting behavior from the platform C implementation. E The mathematical constant e.The math module consists mostly of thin wrappers around the platform CMath library functions.
