nx_complex.nx
buildroot/runtime/nx_complex.nx
about
nx_complex.nx -- complex numbers (a + bi).
Substrate-level complex arithmetic for theorems that need C.
Components stored as i64 (or PPB-scaled for fractional). Real and
imaginary parts independently.
genealogy_id: cardano_1545 + bombelli_1572 + euler_1777 + hamilton_complex_form
lineage_id: algebra_distributivity + commutativity + i_squared_minus_one
axioms: NX_AX_ALG_DISTRIBUTIVITY, NX_AX_ALG_COMMUTATIVITY
dependencies 3 imports · 2 importers
imports: syscalls.nxnx_axioms.nxnx_i128.nx
imported by: nx_qed_freek.nxnx_theorems6_test.nx
structs
| 21 | struct Complex |
consts
| 26 | const NX_COMPLEX_BYTES: i64 = 16 |
functions
| 28 | func nx_cx_alloc() -> *Complex |
| 36 | func nx_cx_set(c: *Complex, re: i64, im: i64) -> i64 |
| 43 | func nx_cx_add(a: *Complex, b: *Complex, out: *Complex) -> i64 |
| 50 | func nx_cx_sub(a: *Complex, b: *Complex, out: *Complex) -> i64 |
| 57 | func nx_cx_mul(a: *Complex, b: *Complex, out: *Complex) -> i64 |
| 64 | func nx_cx_conj(a: *Complex, out: *Complex) -> i64 |
| 71 | func nx_cx_norm_sq(a: *Complex) -> i64 calls 1: nx_muldiv_i64 |
| 76 | func nx_cx_eq(a: *Complex, b: *Complex) -> i64 |
| 83 | func nx_cx_pow(a: *Complex, n: i64, out: *Complex) -> i64 called by 2: nx_th_demoivre_i_power_4_checknx_th_demoivre_i_power_2_check calls 2: nx_cx_allocnx_cx_mul |