F64.sq_clamp: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/math/f64.bend as F64 Lines 460-466 of bend-collections@1.0.0.0/src/math/f64.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/math/f64.bend&start_line=460&end_line=466 import Base import bend-collections@1.0.0.0/src/math/u64.bend as W import bend-collections@1.0.0.0/src/math/w64.bend as X # q = 2^32 (r = 2 s) is taken as q = 2^32 - 1 with u = 2 s def sq_clamp(+e: Nat, +s: U32, +q: W.U64, +u: U32, small: Bool) -> F64: match small: case True{}: sq_qu(e, s, X.lo(q), u) case False{}: sq_qu(e, s, 4294967295, U32.add(s, s)) Uses (8): 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=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/f64.bend&name=F64 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/f64.bend&name=sq_qu https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/u64.bend&name=U64 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/w64.bend&name=lo