interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / seed / omc / tests / float / arith.om

22 lines · 371 bytes Raw Blame History
1note add, sub, mul, div and neg on f64 and f32; truncating conversions make the results observable.
2fn main to int
3if ne int add 1.5f64 2.25f64 3
4ret 1
5end
6if ne int mul 1.5f64 2.25f64 3
7ret 2
8end
9if ne int sub 5.5f64 2.25f64 3
10ret 3
11end
12if ne int div 10.0f64 4.0f64 2
13ret 4
14end
15if ne int neg 2.5f64 -2
16ret 5
17end
18if ne int mul f32 1.5f32 f32 4.0f32 6
19ret 6
20end
21ret 0
22end