def comp1

bend-collections@1.0.0.0 · src/crypto/secp256k1/limbs.bend:43

import bend-collections@1.0.0.0/src/crypto/secp256k1/limbs.bend as Limbs
import Base

43# 2^16 - 1 - x for x below 2^16
44def comp1(+x: Nat) -> Nat:
45  Nat.add(Nat.sub(255n, Nat.mod(x, 256n)), Nat.mul(Nat.sub(255n, Nat.div(x, 256n)), 256n))

Uses (6)

Used by (1)