nx_gcd.nx
buildroot/runtime/nx_gcd.nx
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
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_gcd_test.nxnx_lcm.nx
structs
| none |
consts
| none |
functions
| 21 | func nx_gcd(a: nx_int, b: nx_int) -> nx_int |