Hi all
Probably a silly question here. I'm trying to work out how to use the
'print_csrc' functionality in GiNaC. I don't seem to be able to make it
work.
Please could someone offer me some suggestions on how to fix the
following?
[xxx@xxx nla-ginac]$ cat print.cpp
#include <ginac/ginac.h>
#include <iostream>
using namespace GiNaC;
int main(){
symbol x("x");
ex f = log(pow(x,2));
print_csrc(std::cout);
std::cout << f << std::endl;
}
[xxx@xxx nla-ginac]$ g++ print.cpp -lginac -lcln
[xxx@xxx nla-ginac]$ ./a.out
log(x^2)
Notice that it's outputing 'x^2' and not 'pow(x,2)' or 'x*x'. It seems
that the print_csrc call isn't doing anything. What am I doing wrong?
Cheers,
JP
--
John Pye
School of Mechanical and Manufacturing Engineering
The University of New South Wales
Sydney NSW 2052 Australia
t +61 2 9385 5127
f +61 2 9663 1222
mailto:john.pye_AT_student_DOT_unsw.edu.au
http://pye.dyndns.org/