The above URL links to properly formatted code in the computer language used in the Litvins' text.
GCD(a,b) is computed using Euclid's Method, taken up by Knuth as probably one of the most important algorithms of all
The above URL links to properly formatted code in the computer language used in the Litvins' text.
GCD(a,b) is computed using Euclid's Method, taken up by Knuth as probably one of the most important algorithms of all time.
If a K16 curriculum does not mention Euclid's Method say by grade 10, it's likely not worth the trees that were mowed to truck it to your state.
If you're a parent with a pitch fork, flip to the index and take a look. If Euclid's Method is not in Common Core Standards, write to your state representative and think about finding a more serious school perhaps based overseas in a less backward nation.
Typical of the 1900s was to factor both a and b into unique primes using the "factor tree" method and then taking the product of all primes in common as the GCD. This method does not scale well as it requires a complete factorization, which is both time consuming and impractical in many cases.
Assume rational number p/q is represented