code wiki / (root) / nx_bigfloat120_sinh.nx

nx_bigfloat120_sinh.nx

buildroot/runtime/nx_bigfloat120_sinh.nx

4000 B113 linesdepth 7pulls 7 transitivereach 2 importersview sourcekind librarytopic bigfloat120
docsdependenciesstructsconstsfunctions

about

nx_bigfloat120_sinh.nx -- SOVEREIGN sinh/cosh oracle on the 120-bit bigfloat. cosh = (E + 1/E)/2 with E = exp(x) from the pow organ's bigfloat exp core (bfp_exp_pm) -- no cancellation anywhere. sinh uses the same form for x >= 1 (cancellation there costs < 1 bit) and the EXACT-RATIONAL Taylor series x + x^3/3! + ... for x < 1, where the exp difference would cancel catastrophically at 120 bits. Positive-only core; sinh odd / cosh even handled at the boundary. Overflow: |x| > 711 decided as inf (true cut ~710.476 lands inside bf_to_f64's natural overflow rounding). Self-anchor (see _bf_sinhcosh_gate_authored): double-angle identities sinh(2u) = 2 sinh u cosh u and cosh(2u) = 1 + 2 sinh^2 u (cancellation-free, valid across the whole domain), the pythagorean strip at small |x|, and an f64 tie sinh+cosh = e^x against the BLESSED bf_exp_f64 organ. license_tier: ORIGINAL

dependencies 7 imports · 2 importers

nx_syscalls.nx nx_tier.nx nx_bigfloat120.nx nx_bigfloat120_div.nx nx_bigfloat120_exp.nx nx_bigfloat120_ln.nx nx_bigfloat120_pow.nx nx_bigfloat120_sinh.nx _bf_sinhcosh_gate_authored.nx _f64_sinhcosh_gate_authored.nx

imports: nx_syscalls.nxnx_tier.nxnx_bigfloat120.nxnx_bigfloat120_div.nxnx_bigfloat120_exp.nxnx_bigfloat120_ln.nxnx_bigfloat120_pow.nx

imported by: _bf_sinhcosh_gate_authored.nx_f64_sinhcosh_gate_authored.nx

structs

none

consts

23const K_MAGIC_2047: i64 = 2047

functions

26func _bsh_taylor_sinh(out: *i64, x: *i64) -> i64
50func bf_sinh_xb(out: *i64, xb: *i64) -> i64
65func bf_cosh_xb(out: *i64, xb: *i64) -> i64
78func bf_sinh_f64(x: i64) -> i64
97func bf_cosh_f64(x: i64) -> i64