Skip to content
模除
EntityQ1799665· pop 28· linked from 215 articles

Also known as modulo, modulus

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

Wikidata facts

Subclass of
binary operation
Show 3 more facts
studied by
mathematics
maintained by WikiProject
WikiProject Mathematics
topic has template
Template:Mod
Sources (2)

via Wikidata · CC0

Article · 中文

模除(又稱模数、取模操作、取模運算等,英語:modulo 有时也称作 modulus)得到的是一个数除以另一个数的余数。 给定两个正整数:被除数 a 和除数 n,a modulo n (缩写为 a mod n)得到的是使用欧几里德除法时 a/n 的余数。举个例子:计算表达式 "5 mod 2" 得到 1,因为 5÷2=2...1(5 除以 2 商 2 餘1);而 "9 mod 3" 得到 0,因为 9÷3=3...0;注意:如果使用计算器做除法,不能整除时,你不会得到商,而是会得到一个小数,如:5÷2=2.5。 虽然通常情况下 a 和 n 都是整数,但许多计算系统允许其他类型的数字操作,如:对浮点数取模。一个整数对 n 取模的结果范围为: 0 到 n − 1(a mod 1 恒等于 0;a mod 0 则是未定义的,在编程语言里可能会导致除零错误)。有关概念在数论中的应用请参阅模算數。 当 a 和 n 均为负数时,通常的定义就不适用了,不同的编程语言对结果有不同的处理。

Abstract from DBpedia / Wikipedia · CC BY-SA

Gallery (10)