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 / bench / inference_cost / tasks / task14 / reference.om

13 lines · 175 bytes Raw Blame History
1fn power_mod_u32 a uint b uint to uint
2res = uint 1
3cur = a
4exp = b
5while gt exp 0
6if eq (and exp 1) 1
7res = mul res cur
8end
9cur = mul cur cur
10exp = shr exp 1
11end
12ret res
13end