def Float64.value

bend-collections-laws-math@1.0.0.0 · spec/math/random.bend:119

import bend-collections-laws-math@1.0.0.0/spec/math/random.bend as Random
import Base
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as C
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/f64.bend as F
import bend-collections-laws-math@1.0.0.0/src/math/random/rand.bend as R
import bend-collections-laws-math@1.0.0.0/spec/math/w64.bend as SW
import bend-collections-laws-math@1.0.0.0/spec/math/f64.bend as SF

119# the exact double m * 2^-53 for m = the low 53 bits of x (m and the
120# exponent zb - 53 given as variables n, xv with their equations, so the
121# checker never compares two expansions of the rounding)
122def 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:
123  {R.to_float(x) == SF.round(False{}, n, xv) : F.F64}

Uses (10)

Used by (2)