Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/ng/front/runs/fconv-short-f32-nan.om # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / ng / front / runs / fconv-short-f32-nan.om` 17 lines ยท 350 bytes Raw Blame History 1 note Float conversion parity: preserve the complete converted integer as eight output bytes. 2 fn convert x f32 to short 3 ret short x 4 end 5 fn main to int 6 a = new uchar 8 0 7 x = convert div 0.0f32 0.0f32 8 bits = ulong bitcast ushort x 9 for i ulong len a 10 put a i uchar and shr bits mul i 8 255 11 end 12 k = write 1 a 0 len a 13 if ne k long len a 14 ret 1 15 end 16 ret 0 17 end