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-int-f64-minimum.om

17 lines · 344 bytes Raw Blame History
1note Float conversion parity: preserve the complete converted integer as eight output bytes.
2fn convert x f64 to int
3ret int x
4end
5fn main to int
6a = new uchar 8 0
7x = convert -2.147483648e9f64
8bits = ulong bitcast uint 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