X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=check%2Ftime_dennyfliegner.cpp;h=b14d1b49be410e51bfa9f4231e3cc9d9c69b245c;hb=ef5a801a115be52eec6a9761b8f7da2768cdc830;hp=5f9e908cf1709bd02fc9ded017dde62a4b0a619f;hpb=e7cc6a764ff67b5885d6633385fac23ccc1dc9a7;p=ginac.git diff --git a/check/time_dennyfliegner.cpp b/check/time_dennyfliegner.cpp index 5f9e908c..b14d1b49 100644 --- a/check/time_dennyfliegner.cpp +++ b/check/time_dennyfliegner.cpp @@ -7,7 +7,7 @@ * after which e should be just a1^2. */ /* - * GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2005 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 @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "times.h" @@ -42,7 +42,7 @@ static unsigned expand_subs(unsigned size) // prepare aux so it will swallow anything but a1^2: aux = -e + a[0] + a[1]; - e = pow(e,2).expand().subs(a[0]==aux).expand(); + e = pow(e,2).expand().subs(a[0]==aux, subs_options::no_pattern).expand(); if (e != pow(a[1],2)) { clog << "Denny Fliegner's quick consistency check erroneously returned " @@ -53,7 +53,7 @@ static unsigned expand_subs(unsigned size) return result; } -unsigned time_dennyfliegner(void) +unsigned time_dennyfliegner() { unsigned result = 0; @@ -64,10 +64,10 @@ unsigned time_dennyfliegner(void) vector times; timer breitling; - sizes.push_back(25); - sizes.push_back(50); sizes.push_back(100); sizes.push_back(200); + sizes.push_back(400); + sizes.push_back(800); for (vector::iterator i=sizes.begin(); i!=sizes.end(); ++i) { breitling.start(); @@ -85,10 +85,10 @@ unsigned time_dennyfliegner(void) // print the report: cout << endl << " size: "; for (vector::iterator i=sizes.begin(); i!=sizes.end(); ++i) - cout << '\t' << (*i); + cout << '\t' << *i; cout << endl << " time/s:"; for (vector::iterator i=times.begin(); i!=times.end(); ++i) - cout << '\t' << int(1000*(*i))*0.001; + cout << '\t' << *i; cout << endl; return result;