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 / tests / one_layer / generalization / dev / tasks / cases / devgen03 / prompt

4 lines · 403 bytes Raw Blame History
1Write a function mix_hash that takes an unsigned 16-bit number seed and an unsigned 8-bit number n and
2returns an unsigned 16-bit number. Define a helper function h that takes unsigned 32-bit numbers s and i
3and returns (s * 31 + i * i + 7) modulo 65536. Start with s = seed; then for each i from 0 to n - 1 in
4order, replace s by h(s, i). Return the final s (mix_hash(seed, 0) = seed). It never traps.