MCPcopy Create free account
hub / github.com/antlr/codebuff / plusMod

Method plusMod

output/java_guava/1.4.16/LongMath.java:1195–1197  ·  view source on GitHub ↗

Returns (a + b) mod m. Precondition: 0 <= a, b < m < 2^63.

(long a, long b, long m)

Source from the content-addressed store, hash-verified

1193 * Returns (a + b) mod m. Precondition: 0 <= a, b < m < 2^63.
1194 */
1195 private long plusMod(long a, long b, long m) {
1196 return (a >= m - b) ? (a + b - m) : (a + b);
1197 }
1198
1199 /**
1200 * Returns (a * 2^32) mod m. a may be any unsigned long.

Callers 2

mulModMethod · 0.95
squareModMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected