code wiki / (root) / nx_f16_test.nx

nx_f16_test.nx

buildroot/runtime/nx_f16_test.nx

4275 B88 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_f16_test.nx -- smoke + IEEE 754 conformance for nx_f16.nx. Tests cover: A) Verdict + classification gates B) Sign manipulation (neg, abs) C) IEEE 754 equality (NaN != NaN, +0 == -0) D) Multiplication on canonical bit patterns: 1.0 * 1.0 = 1.0 (0x3C00 * 0x3C00 = 0x3C00) 2.0 * 0.5 = 1.0 (0x4000 * 0x3800 = 0x3C00) -1.0 * 1.0 = -1.0 (0xBC00 * 0x3C00 = 0xBC00) -1.0 * -1.0 = 1.0 (0xBC00 * 0xBC00 = 0x3C00) 0.0 * any = 0.0 (zero propagation) 0.0 * inf = NaN (IEEE 754 spec) inf * 1.0 = inf NaN * 1.0 = NaN

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_f16.nx nx_f16_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_f16.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_f16_cls_is_valid nx_f16_classify nx_f16_exp_field nx_f16_mant_field nx_f16_neg nx_f16_abs nx_f16_eq nx_f16_is_nan nx_f16_classify ↻ nx_f16_is_zero nx_f16_classify ↻ nx_f16_mul nx_f16_classify ↻ nx_f16_sign nx_f16_mant_field ↻ nx_f16_exp_field ↻ nx_f16_is_nan ↻

structs

none

consts

none

functions

21func main() -> i64