# 取余（Remainder of a division，mod）

整数除法的余数。

## 怎么写

### mod(a, b)

**a**

被除数。接受一个整数。

**b**

除数。接受一个整数。

## 示例

- $\displaystyle 17 \bmod 5 = 2$

  `mod(17, 5)`

  在求解器中，`mod(17, 5)` 的结果是 `2`。

  [在求解器中打开](https://zh.hilberon.com/?q=mod%2817%2C%205%29)
- $\displaystyle (-3) \bmod 5 = 2$

  `mod(-3, 5)`

  在求解器中，`mod(-3, 5)` 的结果是 `2`。

  [在求解器中打开](https://zh.hilberon.com/?q=mod%28-3%2C%205%29)

## 相关函数

- [negate](https://zh.hilberon.com/library/negate)

  一个数的相反数：负号的函数形式。
- [min](https://zh.hilberon.com/library/min)

  若干个数中的最小值。
- [plus](https://zh.hilberon.com/library/plus)

  数值之和：+ 的函数形式。
- [max](https://zh.hilberon.com/library/max)

  若干个数中的最大值。
- [power](https://zh.hilberon.com/library/power)

  幂：^ 的函数形式。
- [log2](https://zh.hilberon.com/library/log2)

  以 2 为底的对数。

---
Source: https://zh.hilberon.com/library/mod
