interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / tools / exp445 / arms / examples / halve_or_dec_steps / prompt

3 lines · 283 bytes Raw Blame History
1Write a function halve_or_dec_steps that takes an unsigned 32-bit number n and counts the steps that
2bring it down to 1 or less, where one step halves n when n is even and subtracts 1 when n is odd.
3Return the count as an unsigned 32-bit number (0 when n is 0 or 1). It never traps.