code wiki / (root) / nx_extended_gcd.nx

nx_extended_gcd.nx

buildroot/runtime/nx_extended_gcd.nx

1455 B45 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_extended_gcd.nx -- extended Euclidean: gcd + Bezout coefficients. genealogy_id: knuth_taocp_4_5_2_algorithm_x lineage_id: number_theory_foundation references: Bezout 1624 (identity); Knuth TAoCP Vol 2 4.5.2 Algorithm X. license: public_domain complexity: O(log min(a, b)) divisions. Tier discipline: arithmetic values are nx_int; pointers carry the same type so swapping the substrate tier carries through.

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_tier.nx nx_extended_gcd.nx nx_extended_gcd_test.nx nx_modinv.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_extended_gcd_test.nxnx_modinv.nx

structs

none

consts

none

functions

23func nx_extended_gcd(a: nx_int, b: nx_int, x_out: *nx_int, y_out: *nx_int) -> nx_int
called by 2: mainnx_modinv