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 / tools / exp445 / arms / examples / cube_xor_pair / program.osc

9 lines · 213 bytes Raw Blame History
1fn cube_xor_pair(n: u8) -> u16 {
2 let t: own [u16; 16] = alloc(0);
3 for i in 0 .. 16 {
4 let v: u16 = i as u16;
5 t[i] = v * v * v;
6 }
7 let j: u32 = n as u32;
8 return t[j] ^ t[j + 1];
9}