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 / tests / one_layer / omegese / dev / dev07.omegese
| 1 | fn isqrt x uint to uint |
| 2 | v = ulong x |
| 3 | r = ulong 0 |
| 4 | for i ulong 16 |
| 5 | sh = sub 15 i |
| 6 | bit = shl 1 sh |
| 7 | c = or r bit |
| 8 | sq = mul c c |
| 9 | if le sq v |
| 10 | r = c |
| 11 | end |
| 12 | end |
| 13 | ret uint r |
| 14 | end |