code wiki / (root) / nx_fp32_q14_test.nx

nx_fp32_q14_test.nx

buildroot/runtime/nx_fp32_q14_test.nx

2571 B60 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_fp32_q14_test.nx -- IEEE 754 binary32 -> Q14 conversion against known bit patterns. Pure math test, no I/O. Closed-form expected values (computed by hand from the IEEE 754 spec; Q14 unit = 1/16384 so q14 = value * 16384): bits value expected q14 0x00000000 0.0 0 0x3F800000 1.0 16384 0x40000000 2.0 32768 0x3F000000 0.5 8192 0xBF800000 -1.0 -16384 0x44800000 1024.0 16777216 (= 2^24) 0x42C80000 100.0 1638400 0x7F800000 +Inf NX_FP32_Q14_INVALID 0x7FC00000 NaN NX_FP32_Q14_INVALID 0x00000001 tiny subnormal 0 expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_fp32_q14.nx nx_fp32_q14_test.nx

imports: nx_syscalls.nxnx_fp32_q14.nx

imported by: nobody (leaf or entry point)

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

main nx_fp32_bits_to_q14 sys_mmap nx_fp32_bytes_to_q14 nx_fp32_bits_to_q14 ↻

structs

none

consts

none

functions

25func main() -> i64