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 / devgen01 / prompt
| 1 | Write a function poly_sum that takes an unsigned 8-bit number n and returns an unsigned 32-bit number. |
| 2 | Define a helper function f that takes an unsigned 32-bit number x and returns 3*x*x + 2*x + 1, and use |
| 3 | it: poly_sum(n) is the sum of f(i) for every i from 0 to n - 1 (poly_sum(0) = 0). The result always |
| 4 | fits in 32 bits. It never traps. |