Elementwise.below_zero: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise Lines 34-38 of bendtorch-core@0.1.0.0/src/tensor/elementwise.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&start_line=34&end_line=38 import Base # IEEE 754 `x < 0`, on the bits: the words above -0.0 (0x80000000) up to # -inf (0xFF800000). -0.0, +0.0 and every NaN are not below zero. def below_zero(x: F32) -> Bool: +word = bits(x) Bool.and(U32.is_lt(2147483648, word), U32.is_le(word, 4286578688)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=bits