diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-07 22:47:06 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-07 22:47:06 -0300 |
commit | b9e5a1f2448aeaca8aa807f3baccbe66f5dc49d2 (patch) | |
tree | af6b9427336da58196097edfa6e1e3dc779f1782 /log-fourier_integrator.cpp | |
parent | 9ce5e8b399f29d932d52fd53ac903a106a267259 (diff) | |
download | code-b9e5a1f2448aeaca8aa807f3baccbe66f5dc49d2.tar.gz code-b9e5a1f2448aeaca8aa807f3baccbe66f5dc49d2.tar.bz2 code-b9e5a1f2448aeaca8aa807f3baccbe66f5dc49d2.zip |
Average first two values of C to fix μ
Diffstat (limited to 'log-fourier_integrator.cpp')
-rw-r--r-- | log-fourier_integrator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp index 55f358a..017def7 100644 --- a/log-fourier_integrator.cpp +++ b/log-fourier_integrator.cpp @@ -140,7 +140,8 @@ int main(int argc, char* argv[]) { std::vector<Real> Rₜ₊₁ = fft.inverse(Ȓₜ₊₁); std::vector<Real> Cₜ₊₁ = fft.inverse(Ĉₜ₊₁); - μₜ *= pow(tanh(Cₜ₊₁[0]-1)+1, x); + Real C₀ = (Cₜ₊₁[0] + Cₜ₊₁[1]) / 2; + μₜ *= pow(tanh(C₀-1)+1, x); ΔCₜ = 0; for (unsigned i = 0; i < N; i++) { |