* input in the consistency checks. */
/*
- * GiNaC Copyright (C) 1999-2004 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2022 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
*
* 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 <cstdlib>
#include "ginac.h"
-using namespace std;
using namespace GiNaC;
+#include <cstdlib>
+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
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) {
/* 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);