From 9872645d5ac63a927f44e84a4e2715499e5afe78 Mon Sep 17 00:00:00 2001 From: user1823 <92206575+user1823@users.noreply.github.com> Date: Sat, 26 Apr 2025 07:35:38 +0530 Subject: [PATCH] Update sorting by R for FSRS 6 (#3949) * Update sorting by R for FSRS 6 * Update sqlite.rs --- rslib/src/storage/sqlite.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rslib/src/storage/sqlite.rs b/rslib/src/storage/sqlite.rs index e7057946d..fb7066caf 100644 --- a/rslib/src/storage/sqlite.rs +++ b/rslib/src/storage/sqlite.rs @@ -384,10 +384,8 @@ fn add_extract_fsrs_relative_retrievability(db: &Connection) -> rusqlite::Result .max(0.0001); return Ok(Some( - // power should be the reciprocal of the value of DECAY in FSRS-rs, - // which is currently -0.5 - -(current_retrievability.powi(-2) - 1.) - / (desired_retrievability.powi(-2) - 1.), + -(current_retrievability.powf(-1.0 / decay) - 1.) + / (desired_retrievability.powf(-1.0 / decay) - 1.), )); } }