mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 07:37:11 -05:00
More accurate sorting by R (#3747)
* Match calc of relative overdueness in SM2 and FSRS * Fix calculation of FSRS relative overdueness * Improve readability by avoiding double negative * Move comment line
This commit is contained in:
parent
9b2987b4a8
commit
b80384c715
2 changed files with 5 additions and 2 deletions
|
|
@ -775,7 +775,8 @@ impl fmt::Display for ReviewOrderSubclause {
|
|||
ReviewOrderSubclause::DifficultyDescending => "extract_fsrs_variable(data, 'd') desc",
|
||||
ReviewOrderSubclause::RetrievabilitySm2 { today, order } => {
|
||||
temp_string = format!(
|
||||
"ivl / cast({today}-due+0.001 as real) {order}",
|
||||
// - (elapsed days+0.001)/(scheduled interval)
|
||||
"-(1 + cast({today}-due+0.001 as real)/ivl) {order}",
|
||||
today = today
|
||||
);
|
||||
&temp_string
|
||||
|
|
|
|||
|
|
@ -388,7 +388,9 @@ fn add_extract_fsrs_relative_retrievability(db: &Connection) -> rusqlite::Result
|
|||
.max(0.0001);
|
||||
|
||||
Ok(Some(
|
||||
-(1. / current_retrievability - 1.) / (1. / desired_retrievability - 1.),
|
||||
// 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.),
|
||||
))
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue