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/train/aien-train/tests/adtrain/replay/padprobe.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 / train / aien-train / tests / adtrain / replay / padprobe.om` 32 lines ยท 672 bytes Raw Blame History 1 note SPDX-License-Identifier: AGPL-3.0-only 2 note padprobe: sign of a tape reduction whose inputs are all -0. 3 note Unit order: metadata.om, tape.om (or a mutant of it), this file. 4 note Sums a [1,4] leaf of -0.0 along axis 1 with tpsum. IEEE 754 RNE gives 5 note -0 + -0 = -0, so with the contract's -0 lane padding the sum is -0. 6 note Exits: 11 the sum is -0, 10 the sum is +0, 12 any other value, 7 note 87 a tape refusal. 8 fn main to int 9 tpreset 10 id = tpleaf 1 4 0 11 if ne id 0 12 ret 87 13 end 14 for i ulong 4 15 st = tpset 0 i neg 0.0f32 16 if ne st 0 17 ret 87 18 end 19 end 20 s = tpsum 0 1 21 if ne s 1 22 ret 87 23 end 24 b = bitcast uint tpval 1 0 25 if eq b `2147483648` 26 ret 11 27 end 28 if eq b 0 29 ret 10 30 end 31 ret 12 32 end