Dtype.BF16.round: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/dtype.bend as Dtype Lines 58-60 of bendtorch@1.3.0.0/dtype.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/dtype.bend&start_line=58&end_line=60 import Base # x rounded to the nearest BF16 value, as an F32 (x.to(torch.bfloat16).to(torch.float32)) def BF16.round(+x: F32) -> F32: BF16.to_f32(BF16.of_f32(x)) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/dtype.bend&name=BF16.of_f32 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/dtype.bend&name=BF16.to_f32