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 / task05 / reference.py

10 lines · 225 bytes Raw Blame History
1def isqrt_u32(x):
2 lo, hi, ans = 0, 65535, 0
3 while lo <= hi:
4 mid = (lo + hi) // 2
5 if mid * mid <= x:
6 ans = mid
7 lo = mid + 1
8 else:
9 hi = mid - 1
10 return ans