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 / arrays.om
| 1 | note f64 and f32 elements in local arrays keep their exact bits. |
| 2 | fn main to int |
| 3 | a = new f64 4 1.5 |
| 4 | put a 2 2.5 |
| 5 | b = bitcast ulong get a 2 |
| 6 | if ne b 4612811918334230528 |
| 7 | ret 1 |
| 8 | end |
| 9 | c = new f32 4 1.5 |
| 10 | d = bitcast uint get c 1 |
| 11 | if ne d 1069547520 |
| 12 | ret 2 |
| 13 | end |
| 14 | ret 0 |
| 15 | end |