MathFp32.logarithm_finish: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/math_fp32.bend as MathFp32 Lines 176-184 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=176&end_line=184 import Base # Scaling a subnormal by 2^23 is exact. Zero, negatives, infinities and # NaNs are selected explicitly, after normalizing the finite positive input. def logarithm_finish(+x: F32,value: F32) -> F32: +word = F32.bits(x) +magnitude = U32.and(word,2147483647) +zero = (0 - U32.shrn((magnitude - 1 : U32),31n) : U32) +negative = (0 - U32.shrn(word,31n) : U32) +special = U32.not((0 - U32.shrn((magnitude - 2139095040 : U32),31n) : U32)) selected(zero,from_bits(4286578688),selected(negative,from_bits(2143289344),selected(special,(x + x : F32),value))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.add 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=from_bits https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/math_fp32.bend&name=selected