code wiki / _hdl_build / nx_mathspec_sinhcosh.nx

nx_mathspec_sinhcosh.nx

buildroot/runtime/_hdl_build/nx_mathspec_sinhcosh.nx

4749 B156 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic mathspec
docsdependenciesstructsconstsfunctions

about

nx_mathspec_sinhcosh.nx -- SOVEREIGN SPEC EMITTER for the SINH/COSH kernels: every constant from the 120-bit bigfloat. No python, no minimax: exp-dd core reuses the POW families (ln2 32-bit hi/lo split, Bernoulli P_k = 2*B_2k/(2k)!) plus INV_LN2 for the reduction multiply; Taylor paths use exact factorial reciprocals 1/(2k+1)! (sinh) and 1/(2k)! (cosh), divided factor-by-factor under the bf_div_small bound. Layout: c[0]=one c[1]=half c[2]=two c[3]=INV_LN2 c[4]=ln2_h c[5]=ln2_l c[6..13]=P8..P1 (hi-first, signed) c[14..23]=sinh coeffs hi-first: 1/(2k+1)! k=10..1 c[24..33]=cosh coeffs hi-first: 1/(2k)! k=10..1 c[34]=28.0 (e^-2x sub-ulp cut) c[35]=711.0 (hard overflow cut) license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_pattern_emit.nx nx_bigfloat120.nx nx_bigfloat120_div.nx nx_bigfloat120_exp.nx nx_mathspec_sinhcosh.nx

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

imported by: nobody (leaf or entry point)

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

main sys_openat_wr sys_exit pe_w sys_write bf_new sys_mmap bf_set_int msh_emit_row pe_w ↻ pe_wn sys_mmap ↻ sys_write ↻ msh_wlit pe_w ↻ pe_wn ↻ bf_to_f64 bf_is_zero bf_copy bf_ln2 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_div bf_is_zero ↻ bf_copy ↻

structs

none

consts

19const K_MAGIC_2730: i64 = 2730
20const K_MAGIC_3617: i64 = 3617

functions

22func msh_wlit(fd: i64, v: i64) -> i64
called by 1: msh_emit_row calls 2: pe_wpe_wn
32func msh_emit_row(fd: i64, idx: i64, v: i64) -> i64
called by 1: main calls 3: pe_wpe_wnmsh_wlit
40func msh_pk(out: *i64, bnum: i64, bden: i64, twok: i64) -> i64
55func msh_invfact(out: *i64, m: i64) -> i64
69func main() -> i64