X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fgenex.cpp;h=c79b81fb60dd1d08fc26a8a578dfdf2561c79f9f;hp=9d44bfe8a0bc890d6d530143618beccdab8036a5;hb=4d63df7aa608598e01279d6ec95aea6f023109e1;hpb=83a7ee99a947cbbf331018b803ad6be43a9ccd45 diff --git a/check/genex.cpp b/check/genex.cpp index 9d44bfe8..c79b81fb 100644 --- a/check/genex.cpp +++ b/check/genex.cpp @@ -4,7 +4,7 @@ * input in the consistency checks. */ /* - * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2016 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,11 +21,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include "ginac.h" -using namespace std; using namespace GiNaC; +#include +using namespace std; + /* Create a dense univariate random polynomial in x. * (of the form 9 - 22*a - 17*a^2 + 14*a^3 + 7*a^4 + 7a^5 if degree==5) */ const ex @@ -54,13 +55,13 @@ dense_bivariate_poly(const symbol & x1, const symbol & x2, unsigned degree) return bipoly; } -/* Chose a randum symbol or number from the argument list. */ +/* Chose a random symbol or number from the argument list. */ const ex random_symbol(const symbol & x, - const symbol & y, - const symbol & z, - bool rational = true, - bool complex = false) + const symbol & y, + const symbol & z, + bool rational = true, + bool complex = false) { ex e; switch (abs(rand()) % 4) { @@ -92,12 +93,12 @@ random_symbol(const symbol & x, /* Create a sparse random tree in three symbols. */ const ex sparse_tree(const symbol & x, - const symbol & y, - const symbol & z, - int level, - bool trig = false, // true includes trigonomatric functions - bool rational = true, // false excludes coefficients in Q - bool complex = false) // true includes complex numbers + const symbol & y, + const symbol & z, + int level, + bool trig = false, // true includes trigonometric functions + bool rational = true, // false excludes coefficients in Q + bool complex = false) // true includes complex numbers { if (level == 0) return random_symbol(x,y,z,rational,complex);