Any function was confused with an exponent of the same argument
during a normalisation of an expression.
Example: normal(cos(x)/exp(x)) often returned 1 for realsymbol x.
// they can be rationalised more efficiently
if (is_a<function>(e_replaced) && is_ex_the_function(e_replaced, exp)) {
for (auto & it : repl) {
- if (is_a<function>(it.second) && is_ex_the_function(e_replaced, exp)) {
+ if (is_a<function>(it.second) && is_ex_the_function(it.second, exp)) {
ex ratio = normal(e_replaced.op(0) / it.second.op(0));
if (is_a<numeric>(ratio) && ex_to<numeric>(ratio).is_rational()) {
// Different exponents can be treated as powers of the same basic equation