code wiki / _hdl_build / nx_mathspec_sinhcosh.nx
nx_mathspec_sinhcosh.nx
buildroot/runtime/_hdl_build/nx_mathspec_sinhcosh.nx
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
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
structs
| none |
consts
| 19 | const K_MAGIC_2730: i64 = 2730 |
| 20 | const K_MAGIC_3617: i64 = 3617 |
functions
| 22 | func msh_wlit(fd: i64, v: i64) -> i64 |
| 32 | func msh_emit_row(fd: i64, idx: i64, v: i64) -> i64 |
| 40 | func msh_pk(out: *i64, bnum: i64, bden: i64, twok: i64) -> i64 |
| 55 | func msh_invfact(out: *i64, m: i64) -> i64 |
| 69 | func main() -> i64 |