Fixed.ones4: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/src/math/fixed.bend as Fixed Lines 168-204 of bend-collections-laws-math@1.0.0.0/src/math/fixed.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/src/math/fixed.bend&start_line=168&end_line=204 import Base # the 1 bits of a value below 16 def ones4(+n: Nat) -> Nat: match n: case 0n: 0n case 1n: 1n case 2n: 1n case 3n: 2n case 4n: 1n case 5n: 2n case 6n: 2n case 7n: 3n case 8n: 1n case 9n: 2n case 10n: 2n case 11n: 3n case 12n: 2n case 13n: 3n case 14n: 3n case 15n: 4n case 16n+m: 0n Uses (1): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat