[GiNaC-devel] Fixing log evaluation for powers

Richard B. Kreckel kreckel at ginac.de
Sun Dec 29 01:04:29 CET 2013


Hi Vladimir,

On 11/04/2013 01:57 PM, Vladimir V. Kisil wrote:
> 	Making check on current master, I noticed that the following
>   test
> 
>   if (!ex(log(pow(p,a))).is_equal(a*log(p)))
>      ++result;
> 
>   from exam_inifnc.cpp failed. I think that the evaluation rule
> 
>   log(p^a) -> a*log(p), if p>0 and a is real
> 
>   falls out of inifcns_trans.cpp. I am attaching the corresponding
>   patch.

Out of curiosity, I let git bisect to the regression and found the
culprit. But how exactly your expansion rules for exp(), log(), and
abs() managed to break this evaluation is a mystery to me.

Anyway, thanks for your patch! I've applied it.

Cheers
   -richy.
-- 
Richard B. Kreckel



More information about the GiNaC-devel mailing list