MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / modulo

Function modulo

scripts/sparc2/test-file.js:64–69  ·  view source on GitHub ↗

* Calculates the remainder of the division of two numbers. * @param {number} a - The dividend * @param {number} b - The divisor * @returns {number} The remainder of a divided by b * @throws {Error} If b is zero

(a, b)

Source from the content-addressed store, hash-verified

62 * @throws {Error} If b is zero
63 */
64function modulo(a, b) {
65 if (b === 0) {
66 throw new Error(`Modulo by zero is undefined. Inputs were: a=${a}, b=${b}`);
67 }
68 return a % b;
69}
70
71// Test cases
72function runTests() {

Callers 1

runTestsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected