From: Christian Bauer Date: Tue, 25 Jan 2000 22:35:47 +0000 (+0000) Subject: - lcm_of_coefficients() works for unexpanded polynomials X-Git-Tag: release_0-5-0~34 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=a7ba1a7f55e47f75673008381f814f96dc0ff564;ds=sidebyside - lcm_of_coefficients() works for unexpanded polynomials - frac_cancel() works for unexpanded polynomials - gcd() can handle partially-factored input polynomials without expanding them --- diff --git a/ginac/normal.cpp b/ginac/normal.cpp index f0d9c1ab..a7a37015 100644 --- a/ginac/normal.cpp +++ b/ginac/normal.cpp @@ -190,27 +190,56 @@ static numeric lcmcoeff(const ex &e, const numeric &l) { if (e.info(info_flags::rational)) return lcm(ex_to_numeric(e).denom(), l); - else if (is_ex_exactly_of_type(e, add) || is_ex_exactly_of_type(e, mul)) { + else if (is_ex_exactly_of_type(e, add)) { numeric c = _num1(); for (unsigned i=0; i a.nops()) + goto factored_b; +factored_a: + ex g = _ex1(); + ex acc_ca = _ex1(); + ex part_b = b; + for (int i=0; i b.nops()) + goto factored_a; +factored_b: + ex g = _ex1(); + ex acc_cb = _ex1(); + ex part_a = a; + for (int i=0; i