Random.Float64.value: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/math/random.bend as Random Lines 119-123 of bend-collections-laws-crypto@1.0.0.0/spec/math/random.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/math/random.bend&start_line=119&end_line=123 import Base import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as C import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W import bend-collections-laws-crypto@1.0.0.0/src/math/f64.bend as F import bend-collections-laws-crypto@1.0.0.0/src/math/random/rand.bend as R import bend-collections-laws-crypto@1.0.0.0/spec/math/w64.bend as SW import bend-collections-laws-crypto@1.0.0.0/spec/math/f64.bend as SF # the exact double m * 2^-53 for m = the low 53 bits of x (m and the # exponent zb - 53 given as variables n, xv with their equations, so the # checker never compares two expansions of the rounding) def Float64.value(+x: W.U64, +n: Nat, +hn: {C.low(53n, SW.value(x)) == n : Nat}, +xv: Nat, +hx: {Nat.sub(SF.zb(), 53n) == xv : Nat}) -> Type: {R.to_float(x) == SF.round(False{}, n, xv) : F.F64} Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend&name=low https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/math/f64.bend&name=round https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/math/f64.bend&name=zb https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/math/w64.bend&name=value https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/f64.bend&name=F64 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/random/rand.bend&name=to_float https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend&name=U64