code wiki / _hdl_build / nx_mathspec_sincos.nx

nx_mathspec_sincos.nx

buildroot/runtime/_hdl_build/nx_mathspec_sincos.nx

4076 B117 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic mathspec
docsdependenciesstructsconstsfunctions

about

nx_mathspec_sincos.nx -- SOVEREIGN SPEC EMITTER (the role python generators held, now a team organ): computes every SINCOS kernel constant on the 120-bit bigfloat and writes the _pm_sin_spec.nx data module the MATH_KERNEL emitter consumes. - 2/pi (f64) - 3-part pi/2 split: HI/MID keep 32 effective mantissa bits (low 21 zeroed) so k*HI and k*MID are EXACT for |k| <= 2^21; LO = f64 remainder. - sin coeffs (-1)^k/(2k+1)!, k=0..9 and cos coeffs (-1)^k/(2k)!, k=0..9 NEGATIVE literals are emitted in `0 - N` form (unary-minus literal landmine). Layout: c[0]=2/pi c[1]=HI c[2]=MID c[3]=LO c[4]=half c[5]=one c[6..15] sin coeffs HI-FIRST (a9..a0) c[16..25] cos coeffs HI-FIRST license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_pattern_emit.nx nx_bigfloat120.nx nx_bigfloat120_div.nx nx_bigfloat120_trig.nx nx_mathspec_sincos.nx

imports: nx_syscalls.nxnx_pattern_emit.nxnx_bigfloat120.nxnx_bigfloat120_div.nxnx_bigfloat120_trig.nx

imported by: nobody (leaf or entry point)

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

main bf_new sys_mmap bf_pi bf_new ↻ bf_atan_inv bf_new ↻ bf_set_int bf_div_small bf_is_zero bf_copy bf_norm bf_mul bf_is_zero ↻ bf_copy ↻ sys_mmap ↻ bf_copy ↻ bf_add bf_is_zero ↻ bf_copy ↻ sys_mmap ↻ bf_shr2 bf_norm ↻ bf_sub bf_is_zero ↻ bf_copy ↻ sys_mmap ↻ bf_shr2 ↻ bf_norm ↻ bf_sub ↻ bf_copy ↻ bf_set_int ↻ bf_div bf_is_zero ↻ bf_copy ↻ bf_norm ↻ bf_to_f64 bf_is_zero ↻ bf_set_f64 bf_sub ↻

structs

none

consts

none

functions

19func msc_wlit(fd: i64, v: i64) -> i64
called by 1: msc_emit_row calls 2: pe_wpe_wn
29func msc_emit_row(fd: i64, idx: i64, v: i64) -> i64
called by 1: main calls 3: pe_wpe_wnmsc_wlit
36func main() -> i64