summaryrefslogtreecommitdiff
path: root/log-fourier_integrator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'log-fourier_integrator.cpp')
-rw-r--r--log-fourier_integrator.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp
index 37a28eb..9e9e46d 100644
--- a/log-fourier_integrator.cpp
+++ b/log-fourier_integrator.cpp
@@ -146,15 +146,20 @@ int main(int argc, char* argv[]) {
break;
}
if (μ₁ == 0 || μ₂ == 0) {
- if (μ₁ == 0 && Cₜ[0] > 1) {
- /* We found a lower bound */
- μ₁ = μ;
+ if (Cₜ[0] > 1) {
+ if (μ₁ == 0) {
+ /* We found a lower bound */
+ μ₁ = μ;
+ }
+ μ *= 1.01;
}
- if (μ₂ == 0 && Cₜ[0] < 1) {
- /* We found an upper bound */
- μ₂ = μ;
+ if (Cₜ[0] < 1) {
+ if (μ₂ == 0) {
+ /* We found an upper bound */
+ μ₂ = μ;
+ }
+ μ /= 1.01;
}
- μ *= sqrt(sqrt(std::abs(Cₜ[0])));
} else {
/* Once the bounds are set, we can use bisection */
if (Cₜ[0] > 1) {