]> www.ginac.de Git - ginac.git/blobdiff - check/numeric_consist.cpp
- Added Cint 5.4.25 to the list of working Cints
[ginac.git] / check / numeric_consist.cpp
index 600884935b441751b42d437fecdbee14dea58d1b..5839da10e9e7530cb7867cd6dbb6e680c17292ec 100644 (file)
@@ -4,7 +4,7 @@
  *  boolean tests on these numbers like is_integer() etc... */
 
 /*
- *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  */
 
 #include <stdlib.h>
-#include <ginac/ginac.h>
+#include "ginac.h"
 
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
 using namespace GiNaC;
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
 
 /* Simple and maybe somewhat pointless consistency tests of assorted tests and
  * conversions. */
@@ -161,7 +161,7 @@ static unsigned numeric_consist2(void)
     
     // The fix in the workaround left a whole which was fixed hours later...
     ex another_zero = pow(zero,numeric(1)/numeric(2));
-    if (another_zero.compare(exZERO())) {
+    if (!another_zero.is_zero()) {
         clog << "pow(0,1/2) erroneously returned" << another_zero << endl;
         ++result;
     }
@@ -297,7 +297,7 @@ static unsigned numeric_consist4(void)
     // square roots of squares of integers:
     passed = true;
     for (int i=0; i<42; ++i) {
-        if ( !sqrt(numeric(i*i)).is_integer() ) {
+        if (!sqrt(numeric(i*i)).is_integer()) {
             passed = false;
         }
     }
@@ -310,7 +310,7 @@ static unsigned numeric_consist4(void)
     passed = true;
     for (int num=0; num<41; ++num) {
         for (int den=1; den<42; ++den) {
-            if ( !sqrt(numeric(num*num)/numeric(den*den)).is_rational() ) {
+            if (!sqrt(numeric(num*num)/numeric(den*den)).is_rational()) {
                 passed = false;
             }
         }