
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
Mathematical Functions using Python
Python includes following functions that perform mathematical calculations.
Sr.No | Function & Returns ( description ) |
---|---|
1 | abs(x) The absolute value of x: the (positive) distance between x and zero. |
2 | ceil(x) The ceiling of x: the smallest integer not less than x |
3 | cmp(x, y) -1 if x < y, 0 if x == y, or 1 if x > y |
4 | exp(x) The exponential of x: ex |
5 | fabs(x) The absolute value of x. |
6 | floor(x) The floor of x: the largest integer not greater than x |
7 | log(x) The natural logarithm of x, for x> 0 |
8 | log10(x) The base-10 logarithm of x for x> 0. |
9 | max(x1, x2,...) The largest of its arguments: the value closest to positive infinity |
10 | min(x1, x2,...) The smallest of its arguments: the value closest to negative infinity |
11 | modf(x) The fractional and integer parts of x in a two-item tuple. Both parts have the same sign as x. The integer part is returned as a float. |
12 | pow(x, y) The value of x**y. |
13 | round(x [,n]) x rounded to n digits from the decimal point. Python rounds away from zero as a tie-breaker: round(0.5) is 1.0 and round(-0.5) is -1.0. |
14 | sqrt(x) The square root of x for x > 0 |
- Related Articles
- Python Mathematical Functions
- Mathematical Functions in Python?
- Mathematical statistics functions in Python
- Mathematical Functions in Python - Special Functions and Constants
- C++ Mathematical Functions
- Mathematical Functions in Java
- Mathematical Functions in C#
- Mathematical Functions in SQL
- Program to evaluate one mathematical expression without built-in functions in python
- Mathematical Constants in Python
- Explain the basic mathematical operations by using 2y and 5.
- HTML5 Mathematical operators
- Mathematical Logical Connectives
- Mathematical Foundation Introduction
- Decimal Functions in Python

Advertisements