omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / tests / one_layer / exp445 / dev / tasks / cases / dev03 / hidden / reference.osc
| 1 | fn popcount(x: u64) -> u8 { |
| 2 | let mut v: u64 = x; |
| 3 | let mut n: u8 = 0; |
| 4 | for i in 0 .. 64 { |
| 5 | if (v & 1) == 1 { n = n + 1; } |
| 6 | v = v >> 1; |
| 7 | } |
| 8 | return n; |
| 9 | } |