Float division means, the division operation happens until the capacity of a float number. The 2 is the result of 37 modulo 5. We use the // sign to perform floor division in Python. This corrects the bias towards larger numbers when performing a large number of calculations. Tim Peters, who knows where all Python's floating point skeletons are buried, has expressed some worry about my desire to extend these rules to floating point modulo. - Ceiling: Go to the next integer right of where you are. Remarks¶. # import math library import math print (math.floor(15)) print (math.floor(-2.3)) print (math.floor(3.5)) Output of Python math.floor() Function 15-3 3 Note that in output all the numbers (whether they are negative or positive) are less than or equal to the input value by using math.floor() function. Syntax Syntax: floor(x) Where x is a numeric value Example of floor() To perform float division in Python, you can use / operator. $\endgroup$ – k.stm Mar 28 '13 at 15:26 $\begingroup$ Lower limit: Lower than or equal to it. These two methods are part of python math module which helps in getting the nearest integer values of a fractional number. floor, ceil, and trunc always return an Integral value, while round returns an Integral value if called with one argument.. round(1.3) # 1 round(1.33, 1) # 1.3 round breaks ties towards the nearest even number. Be sure to like, share and comment to show your support for our tutorials. The 7 is the result of the floor division of 37 and 5. When one of the operand is a negative number then it floors the result towards negative infinity. Also referred to as integer division. Meanwhile, the same operation in Python 2 represents a classic division that rounds the result down toward negative infinity (also known as taking the floor ). When two positive numbers are involved then it returns the quotient after removing the decimal parts. Points to note! Floor Division. floor() It accepts a number with decimal as parameter and returns the integer which is smaller than the number itself. As discussed in the previous section, when the modulo operator is used with an int, the remainder will take the sign of the divisor: >>> That is to say result contains decimal part. Python Float Division. When dividing an integer by another integer in Python 3, the division operation x / y represents a true division (uses __truediv__ method) and produces a floating point result. The resultant value is a whole integer, though the result’s type is not necessarily int. The Floor-Division operator is an example of a binary operator, as it takes two operands: the dividend and the divisor. Division operator / accepts two arguments and performs float division. In Python, the Floor-Division operator consists of two forward slashes. $\begingroup$ Look at the number line - Floor: Go to the next integer left of where you are. He's probably right; the truncate-towards-negative-infinity rule can cause precision loss for x%1.0 when x is a very small negative number. Below is an example in which the second parameter is a negative number.