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 / tools / exp445 / arms / examples / halve_or_dec_steps / program.osc
| 1 | fn halve_or_dec_steps(n: u32) -> u32 { |
| 2 | let mut x: u32 = n; |
| 3 | let mut k: u32 = 0; |
| 4 | while x > 1 bound 64 { |
| 5 | if x % 2 == 0 { x = x / 2; } else { x = x - 1; } |
| 6 | k = k + 1; |
| 7 | } |
| 8 | return k; |
| 9 | } |