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/tests/x86efi/float/body.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 / tests / x86efi / float / body.om` 98 lines ยท 1385 bytes Raw Blame History 1 note gate 3 body: one hex line per result (bit pattern of an f64/f32 or of an integer result), each 2 note line flushed by its own emit call, so a, b, z and k stay live across every console call. 3 4 fn hx v ulong to void 5 i = ulong 0 6 while lt i 16 7 d = and shr v mul sub 15 i 4 15 8 if lt d 10 9 put ms i uchar add 48 d 10 else 11 put ms i uchar add 87 d 12 end 13 i = add i 1 14 end 15 put ms 16 10 16 emit 17 17 end 18 19 fn hf x f64 to void 20 hx bitcast ulong x 21 end 22 23 fn hl x long to void 24 hx bitcast ulong x 25 end 26 27 fn fv x f64 to f64 28 ret x 29 end 30 31 fn lv x long to long 32 ret x 33 end 34 35 fn uv x ulong to ulong 36 ret x 37 end 38 39 fn run to void 40 a = fv 1.5 41 b = fv 3.25 42 z = fv 0.0 43 k = fsqrt fv 2.0 44 hf add a b 45 hf sub a b 46 hf mul fv 1.1 fv 3.3 47 hf div fv 1.0 fv 3.0 48 hf div a z 49 hf div z z 50 hf k 51 hf fsqrt fv -1.0 52 hf fexp fv 1.0 53 hf fexp fv 0.5 54 hf fexp fv -740.0 55 hf fexp fv 709.0 56 hf fexp fv 710.0 57 hf flog fv 2.0 58 hf flog fv 10.0 59 hf flog fv 1e-310 60 hf flog z 61 hf flog fv -1.0 62 hf f64 lv -7 63 hf f64 uv `18446744073709551615` 64 hf f64 lv `9007199254740993` 65 hl long fv 1e300 66 hl long fv -1e300 67 hl long div z z 68 hl long fv -2.5 69 hx ulong fv -5.0 70 hx ulong fv 1.8e19 71 i = int fv 3e9 72 hl long i 73 u = uchar fv 300.0 74 hx ulong u 75 s = f32 fv 0.1 76 hx ulong bitcast uint s 77 hf f64 s 78 hf fmin div z z fv 1.5 79 hf fmax fv -0.0 z 80 q = bitcast f64 ulong `9218868437227405313` 81 hf add q 1.0 82 n = div z z 83 if ne n n 84 hx 1 85 else 86 hx 0 87 end 88 if eq n n 89 hx 1 90 else 91 hx 0 92 end 93 hf a 94 hf b 95 hf z 96 hf k 97 hf mul add a b k 98 end