Difference between revisions of "Modulus"
(Improved; put in computer meaning. Also, I think this is the way to disambiguate when one meaning is less prominent.) |
DavidB4-bot (talk | contribs) m (→top: clean up) |
||
| Line 8: | Line 8: | ||
| − | The remainder operation is also important in computer programming, and the term "modulus" is used to refer to this operation. In [[ | + | The remainder operation is also important in computer programming, and the term "modulus" is used to refer to this operation. In [[C programming language|C]]-like languages it is denoted with a percent sign: |
::::x = 11 % 3; // x is now 2 | ::::x = 11 % 3; // x is now 2 | ||
| Line 15: | Line 15: | ||
[[Category:Mathematics]] | [[Category:Mathematics]] | ||
| − | [[Category: Programming Languages]] | + | [[Category:Programming Languages]] |
Latest revision as of 15:05, June 23, 2016
- For the term relating to complex numbers, see Complex number.
Aside from its unrelated use in complex numbers, the term modulus refers to the remainder, that is, the remainder of integer division. For example, in 11 / 3 the remainder is 2. This could be stated as Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle mod(11, 3) = 2\,} , though mathematicians much more commonly express it as "11 is congruent to 2 modulo 3" and write it symbolically as "Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 11 \equiv 2\mod 3} ".
The notion of congruence is actually more general than the remainder function. We could also say "2 is congruent to 11 modulo 3", or "Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 2 \equiv 11\mod 3} ".
"Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x \equiv y\mod k} " means that Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x - y\,} is an integer multiple of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle k\,} .
The remainder operation is also important in computer programming, and the term "modulus" is used to refer to this operation. In C-like languages it is denoted with a percent sign:
- x = 11 % 3; // x is now 2
In complex numbers, the modulus is the analogue of the absolute value, given by Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle |a+bi| = \sqrt{a^2 + b^2}}
.