def BigInt.modpow
import bend-kit-bignum@0.1.0.0/bigint.bend as Bigintimport Base
452# b^e mod |m| in [0, |m|). None for m = 0 or e < 0.
453def BigInt.modpow(b: BigInt, e: BigInt, m: BigInt) -> Maybe<&2, BigInt>:
454 match b e m:
455 case BigInt{sb, x} BigInt{se, y} BigInt{sm, Nil{}}:
456 None{}
457 case BigInt{sb, x} BigInt{se, y} BigInt{sm, z}:
458 BigInt.modpow.go(se, sb, x, y, z)
Uses (4)
Used by (0)
No other definition uses this definition.