[GiNaC-devel] Simplifying powers
Richard B. Kreckel
kreckel at ginac.de
Sun Jul 28 22:08:31 CEST 2013
On 07/27/2013 12:51 AM, Vladimir V. Kisil wrote:
> The method power::eval() contains the following rules:
>
> // ^(*(...,x;c1),c2) -> *(^(*(...,x;1),c2),c1^c2) (c1, c2 numeric(), c1>0)
> // ^(*(...,x;c1),c2) -> *(^(*(...,x;-1),c2),(-c1)^c2) (c1, c2 numeric(), c1<0)
>
> Is there a good reason why c1 here shall be numeric? Cannot we simply check the
> positive/negative info flag for c1 for that simplification?
The way it is written, these rewriting rules apply to expairseq. The c1
and c2 stand for overall_coeff, which is of type numeric by definition.
> Shall I prepare a patch for this?
You may try.
-richy.
--
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>
More information about the GiNaC-devel
mailing list