Extended Euclidean algorithm (extended_gcd)
Greatest common divisor of two whole numbers with the multipliers that give it.
How to write it
extended_gcd(a, b)
- a
- A whole number. Takes a whole number.
- b
- A whole number. Takes a whole number.
Examples
extended_gcd(12, 18)In the solver,
Open in the solverextended_gcd(12, 18)gives[6, [-1, 1]].
Related functions
- factor_integer
Prime factorization of a whole number, as a list of prime and exponent pairs.
- euler_phi
Euler's totient: how many whole numbers up to n are coprime to n.
- fibonacci
The n-th Fibonacci number, with F(1) = F(2) = 1.
- euler_e
The n-th Euler number.
- from_continued_fraction
The number a continued fraction stands for.
- divisors
The positive divisors of a whole number, in increasing order.