code wiki / _hdl_build / nx_mathspec_sincos.nx
nx_mathspec_sincos.nx
buildroot/runtime/_hdl_build/nx_mathspec_sincos.nx
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
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
structs
| none |
consts
| none |
functions
| 19 | func msc_wlit(fd: i64, v: i64) -> i64 |
| 29 | func msc_emit_row(fd: i64, idx: i64, v: i64) -> i64 |
| 36 | func main() -> i64 |