code wiki / (root) / nx_gcd.nx

nx_gcd.nx

buildroot/runtime/nx_gcd.nx

1035 B32 linesdepth 2pulls 2 transitivereach 4 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_gcd.nx -- Euclid's algorithm for greatest common divisor. genealogy_id: euclid_300bc_elements_book_vii lineage_id: number_theory_foundation references: Euclid Elements Book VII Prop 2 (c. 300 BC); Knuth TAoCP Vol 2 4.5.2. license: public_domain (2300+ year-old result) complexity: O(log min(a, b)) division steps.

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_tier.nx nx_gcd.nx nx_gcd_test.nx nx_lcm.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_gcd_test.nxnx_lcm.nx

structs

none

consts

none

functions

21func nx_gcd(a: nx_int, b: nx_int) -> nx_int
called by 2: mainnx_lcm