Category talk:Wren-i64: Difference between revisions

Added U64.modInv method.
(Added I64.modMul method.)
(Added U64.modInv method.)
Line 472:
}
return r
}
 
// Returns the multiplicative inverse of 'x' modulo 'n'.
// The arguments can either be U64 objects or Nums but must be co-prime.
static modInv(x, n) {
if (!(x is U64)) x = from(x)
if (!(n is U64)) n = from(n)
return I64.modInv(x.toI64, n.toI64).toU64
}
 
9,482

edits