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
omega-mv / seed / omc / tests / float / globals.om
| 1 | note a float pool holds the same 8-byte (f64) or 4-byte (f32) patterns as an array. |
| 2 | global g f64 4 |
| 3 | global h f32 4 |
| 4 | fn main to int |
| 5 | put g 1 0.5 |
| 6 | b = bitcast ulong get g 1 |
| 7 | if ne b 4602678819172646912 |
| 8 | ret 1 |
| 9 | end |
| 10 | put h 3 1.5 |
| 11 | c = bitcast uint get h 3 |
| 12 | if ne c 1069547520 |
| 13 | ret 2 |
| 14 | end |
| 15 | ret 0 |
| 16 | end |