%

mod / %

目次

  1. modulo (ECMAScript 仕様書算法定義)
  2. メモ

modulo (ECMAScript 仕様書算法定義)#

[2]

The notation “x modulo y” (y must be finite and nonzero) computes a value k of the same sign as y (or zero) such that abs(k) < abs(y) and x - k = q * y for some integer q.

メモ#

[3] JavaScript%POSIXfmod (Perl POSIX モジュールの fmod) や XPath 1.0mod は同じです。

[4] Perl%>>3 とは違います。