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 / devgen02 / hidden / reference.osc
| 1 | fn g(x: i32, c: i32) -> i32 { |
| 2 | return (x - c) * (x + c) + x; |
| 3 | } |
| 4 | |
| 5 | fn shift_sq_sum(n: u8, c: i16) -> i32 { |
| 6 | let m: i32 = n as i32; |
| 7 | let cc: i32 = c as i32; |
| 8 | let mut s: i32 = 0; |
| 9 | let mut i: i32 = 0; |
| 10 | while i < m bound 256 { |
| 11 | s = s + g(i, cc); |
| 12 | i = i + 1; |
| 13 | } |
| 14 | return s; |
| 15 | } |