MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / abs

Function abs

src/compute-engine/numerics/diophantine.ts:46–48  ·  view source on GitHub ↗
(n: bigint)

Source from the content-addressed store, hash-verified

44//
45
46function abs(n: bigint): bigint {
47 return n < 0n ? -n : n;
48}
49
50function sign(n: bigint): bigint {
51 return n > 0n ? 1n : n < 0n ? -1n : 0n;

Callers 6

gcdFunction · 0.70
divisorsFunction · 0.70
squareFactorFunction · 0.70
baseSolutionLinearFunction · 0.70
specialDiopDNFunction · 0.70
diopDNGeneralFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected