Skip to content

Commit

Permalink
fix(rust): typo in add_half_life takes ln(negative) (#15932)
Browse files Browse the repository at this point in the history
  • Loading branch information
jr200 authored Apr 28, 2024
1 parent d247f1b commit 14b352f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/polars-arrow/src/legacy/kernels/ewm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl EWMOptions {
}
pub fn and_half_life(mut self, half_life: f64) -> Self {
assert!(half_life > 0.0);
self.alpha = 1.0 - ((-2.0f64).ln() / half_life).exp();
self.alpha = 1.0 - (-(2.0f64.ln()) / half_life).exp();
self
}
pub fn and_com(mut self, com: f64) -> Self {
Expand Down

0 comments on commit 14b352f

Please sign in to comment.