def gcd
import bend-collections-laws-math@1.0.0.0/src/math/generic.bend as Genericimport Base
import bend-collections-laws-math@1.0.0.0/src/math/num.bend as N
312# Euclid when division is native, the binary gcd otherwise
313def gcd(~T: Data, ~op: N.Op<T> -> T, ~test: N.Test<T> -> Bool, +a: T, +b: T) -> T:
314 gcd_pick(~T, ~op, ~test, a, b, test(N.FastDiv{}))
Uses (4)
Used by (17)
- bend-collections-laws-math@1.0.0.0/src/math/generic:gcd_all_go
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32int:gcd_val
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u64int:gcd_val
- bend-collections-laws-math@1.0.0.0/spec/math/generic:Gcd.agrees
- bend-collections-laws-math@1.0.0.0/src/math/generic:lcm_ok
- …