]> www.ginac.de Git - ginac.git/blobdiff - ginac/utils.cpp
determinant_algo::laplace sometimes had the sign wrong because of the change
[ginac.git] / ginac / utils.cpp
index c4e5bbc4321e4de55e140668630e4ff863cde143..7acb3a983d9237fc940524b587701e2a660820b7 100644 (file)
@@ -4,7 +4,7 @@
  *  but not of any interest to the user of the library. */
 
 /*
- *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2001 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 "ex.h"
 #include "numeric.h"
 #include "utils.h"
+#include "version.h"
 
-#ifndef NO_NAMESPACE_GINAC
 namespace GiNaC {
-#endif // ndef NO_NAMESPACE_GINAC
+
+/* Version information buried into the library */
+const int version_major = GINACLIB_MAJOR_VERSION;
+const int version_minor = GINACLIB_MINOR_VERSION;
+const int version_micro = GINACLIB_MICRO_VERSION;
+
 
 /** ctor for pole_error exception class. */
 pole_error::pole_error(const std::string& what_arg, int degree)
-        : domain_error(what_arg)
+  : domain_error(what_arg)
 {
        deg = degree;
 }
@@ -48,23 +53,12 @@ int pole_error::degree(void) const
 unsigned log2(unsigned n)
 {
        unsigned k;
-       for (k = 0; n > 1; n >>= 1) ++k;
+       for (k = 0; n > 1; n >>= 1)
+               ++k;
        return k;
 }
 #endif
 
-/** Compare two pointers (just to establish some sort of canonical order).
- *  @return -1, 0, or 1 */
-int compare_pointers(const void * a, const void * b)
-{
-       if (a<b) {
-               return -1;
-       } else if (a>b) {
-               return 1;
-       }
-       return 0;
-}
-
 //////////
 // `construct on first use' chest of numbers
 //////////
@@ -760,10 +754,10 @@ const ex & _ex120(void)
 
 // member functions
 
-       // default constructor, destructor, copy constructor assignment operator and helpers
+       // default ctor, dtor, copy ctor assignment operator and helpers
        // none
 
-       // other constructors
+       // other ctors
        // none
 
        // functions overriding virtual functions from bases classes
@@ -784,14 +778,14 @@ const ex & _ex120(void)
 
 
 //////////
-// default constructor, destructor, copy constructor assignment operator and helpers
+// default ctor, dtor, copy ctor assignment operator and helpers
 //////////
 
 // public
 // protected
 
 //////////
-// other constructors
+// other ctors
 //////////
 
 // public
@@ -830,6 +824,4 @@ const ex & _ex120(void)
 // none
 
 
-#ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC
-#endif // ndef NO_NAMESPACE_GINAC