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/gpu/nvidia/om/numeric/no_bf16.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 / gpu / nvidia / om / numeric / no_bf16.om` 14 lines ยท 461 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Integer-only freestanding binary32 to bf16 RNE; preserve quiet NaN payload. 3 note WolframLanguageEvaluator: FromDigits[#,16]& /@ {"`7f800000`","`007fffff`","0040","7fff"} 4 note -> {`2139095040`,`8388607`,64,32767}. 5 fn no_bf16 raw ulong to ulong 6 u = uint raw 7 if eq and u `2139095040` `2139095040` 8 if ne and u `8388607` 0 9 ret ulong or shr u 16 64 10 end 11 end 12 u = add add u 32767 and shr u 16 1 13 ret ulong shr u 16 14 end