Hi! On Fri, Jul 02, 2004 at 05:24:48PM +0200, Ralf Stephan wrote:
While going through the loop computing the gcd of the coeff numerators, one would simultaneously collect the lcm of the denominators, numeric or otherwise, with the end result gcd divided by lcm.
I'm quite satisfied with the following patch. YMMV.
I've implemented this a little differently now, by putting the LCM stuff into integer_content() (which behaved a little inconsistently before, anyway: integer_content(x/2) already returned 1/2). This should work with all polynomials with rational coefficients. It does not work for non-polynomials like x/a+1. For these you have to pipe it through numer_denom() to separate the denominator manually. Bye, Christian -- / Physics is an algorithm \/ http://www.uni-mainz.de/~bauec002/