From: Alexander Frink Date: Wed, 29 Mar 2000 22:22:14 +0000 (+0000) Subject: bug fixed in an incomplete assertion in power.cpp X-Git-Tag: release_0-6-0~41 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=65dd17f1d3b192b7fbe773250702ad191c4019f8;hp=ed19b17bdd0513282c75a2684c77aec3f4fa7088 bug fixed in an incomplete assertion in power.cpp --- diff --git a/ginac/power.cpp b/ginac/power.cpp index bbac8d07..fb4edd56 100644 --- a/ginac/power.cpp +++ b/ginac/power.cpp @@ -632,7 +632,10 @@ ex power::expand_add(const add & a, int n) const GINAC_ASSERT(!is_ex_exactly_of_type(b,add)); GINAC_ASSERT(!is_ex_exactly_of_type(b,power)|| !is_ex_exactly_of_type(ex_to_power(b).exponent,numeric)|| - !ex_to_numeric(ex_to_power(b).exponent).is_pos_integer()); + !ex_to_numeric(ex_to_power(b).exponent).is_pos_integer()|| + !is_ex_exactly_of_type(ex_to_power(b).basis,add)|| + !is_ex_exactly_of_type(ex_to_power(b).basis,mul)|| + !is_ex_exactly_of_type(ex_to_power(b).basis,power)); if (is_ex_exactly_of_type(b,mul)) { term.push_back(expand_mul(ex_to_mul(b),numeric(k[l]))); } else { @@ -644,7 +647,10 @@ ex power::expand_add(const add & a, int n) const GINAC_ASSERT(!is_ex_exactly_of_type(b,add)); GINAC_ASSERT(!is_ex_exactly_of_type(b,power)|| !is_ex_exactly_of_type(ex_to_power(b).exponent,numeric)|| - !ex_to_numeric(ex_to_power(b).exponent).is_pos_integer()); + !ex_to_numeric(ex_to_power(b).exponent).is_pos_integer()|| + !is_ex_exactly_of_type(ex_to_power(b).basis,add)|| + !is_ex_exactly_of_type(ex_to_power(b).basis,mul)|| + !is_ex_exactly_of_type(ex_to_power(b).basis,power)); if (is_ex_exactly_of_type(b,mul)) { term.push_back(expand_mul(ex_to_mul(b),numeric(n-k_cum[m-2]))); } else {