Skip to content

Commit 9872645

Browse files
authored
Update sorting by R for FSRS 6 (#3949)
* Update sorting by R for FSRS 6 * Update sqlite.rs
1 parent a5778f3 commit 9872645

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

rslib/src/storage/sqlite.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,8 @@ fn add_extract_fsrs_relative_retrievability(db: &Connection) -> rusqlite::Result
384384
.max(0.0001);
385385

386386
return Ok(Some(
387-
// power should be the reciprocal of the value of DECAY in FSRS-rs,
388-
// which is currently -0.5
389-
-(current_retrievability.powi(-2) - 1.)
390-
/ (desired_retrievability.powi(-2) - 1.),
387+
-(current_retrievability.powf(-1.0 / decay) - 1.)
388+
/ (desired_retrievability.powf(-1.0 / decay) - 1.),
391389
));
392390
}
393391
}

0 commit comments

Comments
 (0)