def nextafter
bend-collections-laws-math@1.0.0.0 · spec/math/f64.bend:444
import bend-collections-laws-math@1.0.0.0/spec/math/f64.bend as F64
import Base
import bend-collections-laws-math@1.0.0.0/src/math/f64.bend as F
444
445
446
447
448
449def nextafter(+x: F.F64, +y: F.F64) -> F.F64:
450 pick(F.F64, Bool.not(ordered(x, y)), qnan(), pick(F.F64, Cmp.is_eq(ord(x, y)), y, pick(F.F64, is_zero(x), encode(sign(y), 0n, 1n), of_pat(sign(x), pick(Nat, Bool.xor(Cmp.is_lt(ord(x, y)), sign(x)), Nat.add(pat(x), 1n), Nat.sub(pat(x), 1n))))))