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 / tri_kind / prompt
| 1 | Write a function tri_kind that takes three unsigned 16-bit side lengths a, b and c and returns, as an |
| 2 | unsigned 8-bit number: 0 when they cannot form a triangle (the sum of some two sides is at most the |
| 3 | third side; add in 32 bits so the sum cannot wrap), 1 when all three sides are equal, 2 when exactly |
| 4 | two sides are equal, 3 otherwise. It never traps. |