modulo

Modulo

Return to Modulo operation, Outline of mathematics, Essential Math for Data Science, Math Bibliography, Mathematics, Outline of software engineering, Outline of computer science

Snippet from Wikipedia: Modulo

In mathematics and computing, modulo is the binary operation of which the value is the remainder or signed remainder of a division of one number by another, the latter being called the modulus of the operation.

Given two positive numbers a and m, a modulo m (often written as a mod m {\displaystyle a{\bmod {m}}} ) is the remainder of the Euclidean division of a by m, where a is the dividend and m is the divisor.

For example, 5 mod 2 = 1 {\displaystyle 5{\bmod {2}}=1} , because dividing 5 by 2 yields a remainder of 1 (besides the quotient of 2), while 9 mod 3 = 0 {\displaystyle 9{\bmod {3}}=0} , because 3 divides evenly into 9, thus leaving a remainder of 0.

In computing, although the modulo operation is typically applied with both of its arguments, a and m, being integers, many systems now allow other types of numeric operands. When they are both integers, the range of values for a mod m {\displaystyle a{\bmod {m}}} is from 0 to m − 1 {\displaystyle m-1} , inclusive. The value of a mod 1 {\displaystyle a{\bmod {1}}} is always 0, for any integer a. When exactly one of a or m is negative, the basic definition breaks down, and programming languages differ in how these values are defined.

Research It More

Fair Use Sources


Cloud Monk is Retired ( for now). Buddha with you. © 2025 and Beginningless Time - Present Moment - Three Times: The Buddhas or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


modulo.txt · Last modified: 2025/02/01 06:41 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki