19 Aug
2001
19 Aug
'01
9:45 a.m.
Hi, I have found that when calling evalf() method for a power instance, its exponent is not evaluated. Here follows an example that demonstrates this: include <ginac/ginac.h> using namespace GiNaC; using namespace std; int main(void) { ex e = pow(2, Pi); cout << "e="; e.print(print_context(cout)); cout << endl; cout << "e.evalf()="; e.evalf().print(print_context(cout)); cout << endl; return 0; } 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? Regards, Pearu