MathFp32.silu_finish: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/math_fp32.bend as MathFp32 Lines 38-44 of stelliferous@0.0.2.0/math_fp32.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/math_fp32.bend&start_line=38&end_line=44 import Base # Above 18 SiLU rounds to x. Pass x through, including positive infinity; # the negative tail uses the clamped input before the final underflow. def silu_finish(+x: F32,value: F32) -> F32: +word = F32.bits(x) +positive = U32.not((0 - U32.shrn(word,31n) : U32)) +large = U32.and(positive,(0 - U32.shrn((1099956224 - word : U32),31n) : U32)) selected(large,x,value) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.bits https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/math_fp32.bend&name=selected