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-bridge/blob/main/tests/native/fsum.om # omega-bridge Omega-first language interoperability: checked conversion backends and native language bindings Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-bridge / tests / native / fsum.om` 18 lines ยท 541 bytes Raw Blame History 1 note fsum: d[i] = a[i] + f16 h[i] in f32 for 4 lanes (h binary16 bits, converted here; zero and normal 2 note inputs), and returns the f32 bit pattern of d[0] + d[3]: an f32 view, a ushort view and an f32 edit array. 3 fn h2b h ushort to uint 4 v = uint h 5 s = shl and shr v 15 1 31 6 e = and shr v 10 31 7 m = and v 1023 8 if eq e 0 9 ret s 10 end 11 ret or or s shl add e 112 23 shl m 13 12 end 13 fn fsum a view f32 4 h view ushort 4 d edit f32 4 to ulong 14 for i ulong 4 15 put d i add get a i bitcast f32 h2b get h i 16 end 17 ret ulong bitcast uint add get d 0 get d 3 18 end