Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/equiv/clamp.unit.om # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / equiv / clamp.unit.om` 20 lines ยท 491 bytes Raw Blame History 1 note irequiv fixture (issue 826): saturating byte add, two parameters (u16 domain). 2 note clamp_add is copied verbatim from tests/one_layer/omegese/dev/dev01.omegese 3 note (omega-mv `62d1d0d6`). clamp_wrap is a refactor that adds in uchar and 4 note detects the wrap instead of widening to ushort. 5 fn clamp_add a uchar b uchar to uchar 6 x = ushort a 7 y = ushort b 8 s = add x y 9 if gt s 255 10 ret 255 11 end 12 ret uchar s 13 end 14 fn clamp_wrap a uchar b uchar to uchar 15 s = add a b 16 if lt s a 17 ret 255 18 end 19 ret s 20 end