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 / prompt
| 1 | Write a function halve_or_dec_steps that takes an unsigned 32-bit number n and counts the steps that |
| 2 | bring it down to 1 or less, where one step halves n when n is even and subtracts 1 when n is odd. |
| 3 | Return the count as an unsigned 32-bit number (0 when n is 0 or 1). It never traps. |