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 / seed / omc / sites / found-s-else-2.om

24 lines · 383 bytes Raw Blame History
1note sites: found by a one-token change of a tracked program; reaches the omc error site in s-else (code 15)
2fn isqrt_u32 x uint to uint
3if eq x 0
4ret 0
5end
6lx = ulong x
7lo = ulong 1
8hi = ulong x
9if gt hi 65536
10hi = ulong 65536
11end
12ans = ulong 1
13while le lo hi
14mid = div (add lo hi) 2
15sq = mul mid mid
16a le sq lx
17ans = mid
18lo = add mid 1
19else
20hi = sub mid 1
21end
22end
23ret uint ans
24end