Skip to content
Snippets Groups Projects
Commit 2f47c740 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

RuinaFunction: not differentiable for x < 1e-14

parent 4d9c49d0
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ class RuinaFunction : public NiceFunction {
double virtual leftDifferential(double x) const {
double const arg = eta_h * x;
if (arg == 0) // TODO: Make this controllable
if (arg < 1e-14) // TODO: Make this controllable
return 0;
double const ret = (a * std::log(arg) + c + K);
......@@ -67,6 +67,9 @@ class RuinaFunction : public NiceFunction {
}
double virtual second_deriv(double s) const {
if (s < 1e-14) // TODO: Make this controllable
return 0;
return coefficientProduct * a / s;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment