code wiki / (root) / nx_js_f64.nx

nx_js_f64.nx

buildroot/runtime/nx_js_f64.nx

5281 B136 linesdepth 4pulls 4 transitivereach 143 importersview sourcekind librarytopic js
docsdependenciesstructsconstsfunctions

about

nx_js_f64.nx -- JS Number (f64) <-> i64 / decimal-string converters for the sovereign JS engine. WB-JS-001 rung R-JS-F64-0/1 (the foundation of f64 JS numbers). NishiLang f64 is software-IEEE: a value IS its 64-bit pattern held in an i64. This organ composes the gated nx_f64 soft-float kernels to add the int<->f64 and string<->f64 conversions that nx_f64 lacks. LIBRARY (no main) -- the gate lives in nx_js_f64_test.nx so nx_js_eval can import this without a two-main build conflict. The engine integration (VAL_FLOAT, float literals, arithmetic) is rung R-JS-F64-2 in nx_js_eval. license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_f64.nx nx_f64_div.nx nx_js_f64.nx nx_js_eval.nx nx_js_f64_test.nx

imports: nx_syscalls.nxnx_f64.nxnx_f64_div.nx

imported by: nx_js_eval.nxnx_js_f64_test.nx

structs

none

consts

12const F64_ONE: i64 = 0x3FF0000000000000 // 1.0
13const F64_TEN: i64 = 0x4024000000000000 // 10.0
14const MANT52: i64 = 0x000FFFFFFFFFFFFF
15const IMPL1: i64 = 0x0010000000000000 // implicit 1 at bit 52

functions

18func ji2f(n: i64) -> i64
37func jf2i(raw: i64) -> i64
54func jpow10(k: i64) -> i64
called by 1: jparse_f64 calls 1: nx_f64_mul
63func jparse_f64(src: *u8, len: i64) -> i64
99func jf64_to_str(raw: i64, out: *u8) -> i64