]> www.ginac.de Git - ginac.git/blobdiff - check/time_gammaseries.cpp
Rewritten heuristic and PRS GCD for univariate polynomials, added benchmark.
[ginac.git] / check / time_gammaseries.cpp
index 3715f836bb334544ca9608e11ce8460e22f51acf..e6ffa8736abe814ab4d963c37893c1326df7576b 100644 (file)
@@ -3,7 +3,7 @@
  *  Some timings on series expansion of the Gamma function around a pole. */
 
 /*
- *  GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2008 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
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "times.h"
+#include <iostream>
+#include <vector>
+#include "ginac.h"
+#include "timer.h"
+using namespace std;
+using namespace GiNaC;
 
 unsigned tgammaseries(unsigned order)
 {
@@ -48,7 +53,6 @@ unsigned time_gammaseries()
        unsigned result = 0;
 
        cout << "timing Laurent series expansion of Gamma function" << flush;
-       clog << "-------Laurent series expansion of Gamma function:" << endl;
 
        vector<unsigned> sizes;
        vector<double> times;
@@ -66,12 +70,6 @@ unsigned time_gammaseries()
                cout << '.' << flush;
        }
 
-       if (!result) {
-               cout << " passed ";
-               clog << "(no output)" << endl;
-       } else {
-               cout << " failed ";
-       }
        // print the report:
        cout << endl << "       order: ";
        for (vector<unsigned>::iterator i=sizes.begin(); i!=sizes.end(); ++i)
@@ -83,3 +81,12 @@ unsigned time_gammaseries()
        
        return result;
 }
+
+extern void randomify_symbol_serials();
+
+int main(int argc, char** argv)
+{
+       randomify_symbol_serials();
+       cout << setprecision(2) << showpoint;
+       return time_gammaseries();
+}