* These exams test solving small linear systems of symbolic equations. */
/*
- * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2003 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 "exams.h"
-static unsigned exam_lsolve1(void)
+static unsigned exam_lsolve1()
{
// A trivial example.
unsigned result = 0;
if (aux != 1) {
++result;
clog << "solution of 3*x+5==8 erroneously returned "
- << aux << endl;
+ << aux << endl;
}
return result;
}
-static unsigned exam_lsolve2a(void)
+static unsigned exam_lsolve2a()
{
// An example from the Maple online help.
unsigned result = 0;
!normal(sol_y - (3-a*b)/(a+b)).is_zero()) {
++result;
clog << "solution of the system " << eqns << " for " << vars
- << " erroneously returned " << sol << endl;
+ << " erroneously returned " << sol << endl;
}
return result;
}
-static unsigned exam_lsolve2b(void)
+static unsigned exam_lsolve2b()
{
// A boring example from Mathematica's online help.
unsigned result = 0;
(sol_y != numeric(-10,17))) {
++result;
clog << "solution of the system " << eqns << " for " << vars
- << " erroneously returned " << sol << endl;
+ << " erroneously returned " << sol << endl;
}
return result;
}
-static unsigned exam_lsolve2c(void)
+static unsigned exam_lsolve2c()
{
// A more interesting example from the Maple online help.
unsigned result = 0;
(sol_y != numeric(-1,2))) {
++result;
clog << "solution of the system " << eqns << " for " << vars
- << " erroneously returned " << sol << endl;
+ << " erroneously returned " << sol << endl;
}
return result;
}
-static unsigned exam_lsolve2S(void)
+static unsigned exam_lsolve2S()
{
// A degenerate example that went wrong in GiNaC 0.6.2.
unsigned result = 0;
(sol_y != t)) {
++result;
clog << "solution of the system " << eqns << " for " << vars
- << " erroneously returned " << sol << endl;
+ << " erroneously returned " << sol << endl;
}
return result;
}
-static unsigned exam_lsolve3S(void)
+static unsigned exam_lsolve3S()
{
// A degenerate example that went wrong while trying to improve elimination
unsigned result = 0;
(sol_z != (b+c)/2)) {
++result;
clog << "solution of the system " << eqns << " for " << vars
- << " erroneously returned " << sol << endl;
+ << " erroneously returned " << sol << endl;
}
return result;
}
-unsigned exam_lsolve(void)
+unsigned exam_lsolve()
{
unsigned result = 0;