[GiNaC-list] unevaluated add in the result of imag_form()
Richard B. Kreckel
kreckel at ginac.de
Thu Sep 23 01:06:30 CEST 2010
Hi!
Richard B. Kreckel wrote:
> Burcin Erocal wrote:
>> Note that the second argument of atan2 is an add object in a rather
>> unusual form: 48+4*(-22)
>>
>> Is this intended behavior?
>
> Definitely not. A simpler case exhibiting the same problem is
> real_part(1+2*(sqrt(2)+1)*(sqrt(2)-1)).
>
> It seems to me that add::eval() is a little bit too simple-minded:
> add::real_part() returns an add with overall_coeff 1 and an expair with
> rest 1 and coeff 2, i.e. 1+2*1, but there is no case in add::eval() to
> take care of this.
I've pushed a patch to the repository.
Thanks a lot for reporting this.
-richy.
--
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>
More information about the GiNaC-list
mailing list