- added ex::to_rational() to convert general expression to rational expression
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Thu, 6 Apr 2000 19:58:15 +0000 (19:58 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Thu, 6 Apr 2000 19:58:15 +0000 (19:58 +0000)
  by replacing all non-rational parts with temporary symbols, e.g.:
    ex a = pow(sin(x), 2) - pow(cos(x), 2);
    ex b = sin(x) + cos(x);
    ex d;
    lst l;
    divide(a.to_rational(l), b.to_rational(l), d);
    cout << d.subs(l) << endl;
  will print "sin(x)-cos(x)"


No differences found