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

Method plusMod

output/java_guava/1.4.19/LongMath.java:1176–1178  ·  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

1174 * Returns (a + b) mod m. Precondition: 0 <= a, b < m < 2^63.
1175 */
1176 private long plusMod(long a, long b, long m) {
1177 return (a >= m - b) ? (a + b - m) : (a + b);
1178 }
1179
1180 /**
1181 * 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