Generic.FSign.select: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/math/generic.bend as Generic Lines 238-240 of bend-collections-laws-crypto@1.0.0.0/spec/math/generic.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/math/generic.bend&start_line=238&end_line=240 import Base import bend-collections-laws-crypto@1.0.0.0/src/math/num.bend as N import bend-collections-laws-crypto@1.0.0.0/src/math/generic.bend as G # 1 above zero, -1 below, x itself otherwise (zeros keep their sign, NaN stays) def FSign.select(~T: Data, ~op: N.Op -> T, ~test: N.Test -> Bool, +x: T) -> Type: {G.sign(~T, ~op, ~test, x) == pick(T, test(N.Lt{op(N.ZeroOp{}), x}), op(N.One{}), pick(T, test(N.Lt{x, op(N.ZeroOp{})}), op(N.Neg{op(N.One{})}), x)) : T} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/math/generic.bend&name=pick https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/generic.bend&name=sign https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/num.bend&name=Op https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/num.bend&name=Test