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 / task10 / reference.om

20 lines · 201 bytes Raw Blame History
1fn is_prime_u32 n uint to uint
2if lt n 2
3ret 0
4end
5if eq n 2
6ret 1
7end
8if eq (and n 1) 0
9ret 0
10end
11d = ulong 3
12ln = ulong n
13while le (mul d d) ln
14if eq (rem ln d) 0
15ret 0
16end
17d = add d 2
18end
19ret 1
20end