键盘快捷键

使用 跳转章节

使用 S/ 在本书内搜索

使用 ? 显示帮助页面

使用 Esc 隐藏帮助页面

Quot

Quot[m, n]

Performs integer division of m by n, truncating toward zero. This function pairs with Rem (remainder) such that:

Let[always_true, Fun[{ m, n }, Eq[Add[Mul[Quot[m, n], n], Rem[m, n]], m]]];
always_true[7, -3]; (* => #t *)
always_true[-9, 2]; (* => #t *)
  • m and n should be integers.
  • Returns a Number representing the integer quotient.
Quot[7, 3];   (* => 2 *)
Quot[-7, 3];  (* => -2 *)