Cannot evaluate numerically 2^Pi, for instance.

Richard B. Kreckel kreckel at thep.physik.uni-mainz.de
Mon Aug 20 17:41:57 CEST 2001


On Sun, 19 Aug 2001, Pearu Peterson wrote:
[...]
> The output is:
> e=2^Pi
> e.evalf()=(2.0)^Pi
> 
> And I don't see anything wrong in
> 	ex power::evalf(int level) const;
> Do you?

After staring at it for an hour or two, yes.  It's most embarrassing.
Here is the fix:

diff -r1.66 power.cpp
493c493
<               if (!is_ex_exactly_of_type(eexponent,numeric))
---
>               if (!is_ex_exactly_of_type(exponent,numeric))

See the problem?    :-)

Thank you for reporting this!
                           -richy.
-- 
Richard Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>





More information about the GiNaC-devel mailing list