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 / tests / one_layer / generalization / dev / tasks / cases / devgen04 / hidden / reference.osc
| 1 | fn even_tri_odd_cube(n: u16) -> u64 { |
| 2 | let x: u64 = n as u64; |
| 3 | if x % 2 == 0 { |
| 4 | let mut s: u64 = 0; |
| 5 | let mut i: u64 = 1; |
| 6 | while i <= x bound 65536 { |
| 7 | s = s + i; |
| 8 | i = i + 1; |
| 9 | } |
| 10 | return s; |
| 11 | } |
| 12 | return x * x * x - 2 * x + 5; |
| 13 | } |