Get tabular backends working with consistency plots; closes #675

Fixed a bunch of bugs with the Tabular methods
This commit is contained in:
Ian Bell
2015-05-16 20:48:41 -06:00
parent 4271f00f4f
commit 44bf43a65f
6 changed files with 142 additions and 69 deletions

View File

@@ -221,16 +221,8 @@ double Secant(FuncWrapper1D* f, double x0, double dx, double tol, int maxiter, s
if (iter>1)
{
double deltax = x2-x1;
if (std::abs(deltax)<1e-14)
{
if (std::abs(fval) < tol*10)
{
return x;
}
else
{
throw ValueError("Step is small but not solved to tolerance");
}
if (std::abs(deltax)<1e-14){
return x;
}
y2=fval;
x3=x2-y2/(y2-y1)*(x2-x1);