+ 1

What is floor division and modulo division?

11th Apr 2020, 8:48 AM
Kirthi Pranav
4 ответов
+ 4
This question has been asked frequently in the past. So please use search bar in the Q&A section. Then select ' most recent' and enter 'modulo' or respectively 'floor' in the search bar. Thanks!
11th Apr 2020, 10:46 AM
Lothar
Lothar - avatar
+ 3
modulus The modulus-function computes the remainder of a division, which is the "leftover" of an integral division. floor The floor-function provides the lower-bound of integral division. The upper-bound is computed by the ceil function. (Basically speaking, the floor-function cuts off all decimals).
12th Apr 2020, 1:31 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
Floor will round the decimal down and uses the / operator in most languages I know eg. 5 / 2 = 2 no decimal after the 2 Modulo division returns the remainder and uses the % operator 5 % 2 = 1
11th Apr 2020, 9:12 AM
HNNX 🐿
HNNX 🐿 - avatar
+ 1
Thank you very much.
11th Apr 2020, 9:13 AM
Kirthi Pranav