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 / ng / front / runs / fconv-long-f32-maximum.om

17 lines · 376 bytes Raw Blame History
1note Float conversion parity: preserve the complete converted integer as eight output bytes.
2fn convert x f32 to long
3ret long x
4end
5fn main to int
6a = new uchar 8 0
7x = convert sub mul 2147483648.0f32 4294967296.0f32 1.0f32
8bits = ulong bitcast ulong x
9for i ulong len a
10put a i uchar and shr bits mul i 8 255
11end
12k = write 1 a 0 len a
13if ne k long len a
14ret 1
15end
16ret 0
17end