composite function

Volker Vogel vogel at
Fri Dec 12 11:04:12 CET 2003


I'am trying to define composite functions,
for example this one:

      / 1 for  all x > 1
f(x) =| x*x  for all 1 >= x >= -1
      \ 1 for all x <-1

Later I want to evaluate this function with different x.
I tried to do this allready using 

symbol x("x");
string polystr="if (abs(x)>1) {1}else{x*x}";
ex poly;
cout  << poly;

but I do not get it working. I assume that I defined
my polystr incorrect, anybody knows how to do
that ?


Volker Vogel

Horoskop, Comics, VIPs, Wetter, Sport und Lotto im WEB.DE Screensaver1.2
Kostenlos downloaden:

More information about the GiNaC-list mailing list