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 / tri_kind / prompt

4 lines · 353 bytes Raw Blame History
1Write a function tri_kind that takes three unsigned 16-bit side lengths a, b and c and returns, as an
2unsigned 8-bit number: 0 when they cannot form a triangle (the sum of some two sides is at most the
3third side; add in 32 bits so the sum cannot wrap), 1 when all three sides are equal, 2 when exactly
4two sides are equal, 3 otherwise. It never traps.