Matmul.halvings: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matmul Lines 317-324 of bendtorch-core@0.1.0.0/src/tensor/matmul.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul.bend&start_line=317&end_line=324 import Base # floor(log2(number)) for a positive number, 0 for 0. `fuel` bounds the # halvings; `number` itself is enough. def halvings(fuel: Nat, +number: Nat) -> Nat: match fuel: case 0n: 0n case 1n+rest: halvings_step(n => halvings(rest, n), number, Nat.is_lt(number, 2n)) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul.bend&name=halvings_step