All Posts

Python Mathematical Functions

Python Mathematical Functions

Python language includes a comprehensive collection of built-in mathematical functions that operate on numerical inputs. In this tutorial, let’s learn about Python Mathematical functions.

Some of the mathematical functions are as follows:

 

Mathematical Function Description
abs(x) The absolute value of x. The function returns a positive value.
fabs(x) The absolute value of x, the function returns the positive value as float.
sqrt(x) The function returns the square root of x, where x>0
pow(x,y) The function returns the value of x^y
ceil(x) The function returns the smallest integer, which is not less than x.
floor(x) The function returns the largest integer not greater than x
exp(x) The function returns the exponent of x, i.e., e^x
log(x) The function returns the natural logarithm of x, where x>0
log 10(x) The function returns the base-10 logarithm of x, where x>0
max(x1,x2) The function returns the largest value among its parameters.
min(x1,x2)  The function returns the smallest value among its parameters.

—

Python Tutorials

Python Tutorial on this website can be found at:

More information on Python is available at the official website:

  • https://www.python.org