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 / bench / inference_cost / tasks / task19 / reference.om
| 1 | fn hamming_dist_u32 a uint b uint to uint |
| 2 | diff = xor a b |
| 3 | c = uint 0 |
| 4 | while gt diff 0 |
| 5 | c = add c (and diff 1) |
| 6 | diff = shr diff 1 |
| 7 | end |
| 8 | ret c |
| 9 | end |