diff --git a/crates/ekore/src/harmonics/cache.rs b/crates/ekore/src/harmonics/cache.rs index f8dfd487c..a9dc6ad25 100644 --- a/crates/ekore/src/harmonics/cache.rs +++ b/crates/ekore/src/harmonics/cache.rs @@ -50,6 +50,8 @@ pub enum K { S1ph, S2ph, S3ph, + S1p2, + G3p2, } /// Hold all cached values. @@ -94,6 +96,7 @@ impl Cache { K::S2mh => w2::S2((self.n - 1.) / 2.), K::S3mh => w3::S3((self.n - 1.) / 2.), K::G3 => g_functions::g3(self.n, self.get(K::S1)), + K::G3p2 => g_functions::g3(self.n + 2., self.get(K::S1p2)), K::Sm1e => w1::Sm1e(self.get(K::S1), self.get(K::S1h)), K::Sm1o => w1::Sm1o(self.get(K::S1), self.get(K::S1mh)), K::Sm2e => w2::Sm2e(self.get(K::S2), self.get(K::S2h)), @@ -105,6 +108,7 @@ impl Cache { K::S1ph => recursive_harmonic_sum(self.get(K::S1mh), (self.n - 1.) / 2., 1, 1), K::S2ph => recursive_harmonic_sum(self.get(K::S2mh), (self.n - 1.) / 2., 1, 2), K::S3ph => recursive_harmonic_sum(self.get(K::S3mh), (self.n - 1.) / 2., 1, 3), + K::S1p2 => recursive_harmonic_sum(self.get(K::S1), self.n, 2, 1), }; // insert self.m.insert(k, val);