Exercise 2.95
Define P1, P2, and P3 to be the polynomials
Now define Q1 to be the product of P1 and P2 and Q2 to be the product of P1 and P3, and use greatest-common-divisor (exercise 2.94) to compute the GCD of Q1 and Q2. Note that the answer is not the same as P1. This example introduces noninteger operations into the computation, causing difficulties with the GCD algorithm.[61] To understand what is happening, try tracing gcd-terms while computing the GCD or try performing the division by hand.
[61] In an implementation like MIT Scheme, this produces a polynomial that is indeed a divisor of Q1 and Q2, but with rational coefficients. In many other Scheme systems, in which division of integers can produce limited-precision decimal numbers, we may fail to get a valid divisor. [back]
Corresponding Section:

Comments
Post new comment