diff --git a/crates/ekore/src/harmonics/w3.rs b/crates/ekore/src/harmonics/w3.rs index 4a0fe6e24..bc7286dcb 100644 --- a/crates/ekore/src/harmonics/w3.rs +++ b/crates/ekore/src/harmonics/w3.rs @@ -27,12 +27,15 @@ pub fn Sm3o(hS3: Complex, hS3mh: Complex) -> Complex { /// Analytic continuation of harmonic sum $S_{-2,1}(N)$ for even moments. pub fn Sm21e(N: Complex, hS1: Complex, hSm1: Complex) -> Complex { - let eta = 1.; - -eta * g3(N + 1., hS1 + 1. / (N + 1.)) + ZETA2 * hSm1 - 5. / 8. * ZETA3 + ZETA2 * LN_2 + Sm21(N, 1., hS1, hSm1) } /// Analytic continuation of harmonic sum $S_{-2,1}(N)$ for odd moments. pub fn Sm21o(N: Complex, hS1: Complex, hSm1: Complex) -> Complex { - let eta = -1.; + Sm21(N, -1., hS1, hSm1) +} + +/// Analytic continuation of harmonic sum $S_{-2,1}(N)$ for odd moments. +fn Sm21(N: Complex, eta: f64, hS1: Complex, hSm1: Complex) -> Complex { -eta * g3(N + 1., hS1 + 1. / (N + 1.)) + ZETA2 * hSm1 - 5. / 8. * ZETA3 + ZETA2 * LN_2 }