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-short-f32-nzero.om

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