Skip to content

Commit

Permalink
Merge pull request #9 from niklasf/fix-step-5.2
Browse files Browse the repository at this point in the history
Fix missing ln for B in step 5.2
  • Loading branch information
DenialAdams authored Nov 8, 2024
2 parents 6369449 + fa36fd6 commit 2e54ce7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ pub fn new_rating(
let delta_squared = delta * delta;
let rd_squared = prior_rating.deviation * prior_rating.deviation;
let mut b = if delta_squared > rd_squared + v {
delta_squared - rd_squared - v
(delta_squared - rd_squared - v).ln()
} else {
let mut k = 1.0;
while f(
Expand Down Expand Up @@ -281,7 +281,7 @@ pub fn new_rating(
sys_constant,
);
// b
if fc * fb < 0.0 {
if fc * fb <= 0.0 {
a = b;
fa = fb;
} else {
Expand Down

0 comments on commit 2e54ce7

Please sign in to comment.