def u64_cdiv

bend-collections-laws-math@1.0.0.0 · src/math/fixed.bend:329

import bend-collections-laws-math@1.0.0.0/src/math/fixed.bend as Fixed
import Base
import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as W
import bend-collections-laws-math@1.0.0.0/src/math/w64.bend as X

329# the quotient is only computed for a nonzero divisor (the two-limb
330# division by zero would build a Nat past the runtime's 2^48 bound)
331def u64_cdiv(z: Bool, +a: W.U64, +b: W.U64) -> Maybe<&2, W.U64>:
332  match z:
333    case True{}:
334      None{}
335    case False{}:
336      Some{X.quot(a, b)}

Uses (4)

Used by (2)