]> www.ginac.de Git - ginac.git/commitdiff
synced to HEAD
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Thu, 9 Oct 2003 21:08:02 +0000 (21:08 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Thu, 9 Oct 2003 21:08:02 +0000 (21:08 +0000)
check/exam_differentiation.cpp

index b131eb03d33249d2598f74664ad4f27f66c13e9b..c91d2f42c3972b6ef3573beb3dbfaf92a2e6102a 100644 (file)
@@ -26,7 +26,7 @@ static unsigned check_diff(const ex &e, const symbol &x,
                                                   const ex &d, unsigned nth=1)
 {
        ex ed = e.diff(x, nth);
-       if ((ed - d).compare(ex(0)) != 0) {
+       if (!(ed - d).is_zero()) {
                switch (nth) {
                case 0:
                        clog << "zeroth ";
@@ -223,7 +223,7 @@ static unsigned exam_differentiation6(void)
        ed = series_to_poly(ed);
        d = series_to_poly(d);
        
-       if ((ed - d).compare(ex(0)) != 0) {
+       if (!(ed - d).is_zero()) {
                clog << "derivative of " << e << " by " << x << " returned "
                     << ed << " instead of " << d << ")" << endl;
                return 1;