Skip to content

Commit

Permalink
fixed files form Math #73
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent c8341a4 commit 2af62a6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ public double solve(final UnivariateRealFunction f,
return solve(f, initial, yInitial, max, yMax, initial, yInitial);
}

if (yMin * yMax > 0) {
throw MathRuntimeException.createIllegalArgumentException(
NON_BRACKETING_MESSAGE, min, max, yMin, yMax);
}

// full Brent algorithm starting with provided initial guess
return solve(f, min, yMin, max, yMax, initial, yInitial);
Expand Down

0 comments on commit 2af62a6

Please sign in to comment.