ts-fsrs 5.4.0 → 5.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -530,7 +530,7 @@
530
530
  return prng;
531
531
  }
532
532
 
533
- const version="5.4.0";
533
+ const version="5.4.1";
534
534
 
535
535
  const default_request_retention = 0.9;
536
536
  const default_maximum_interval = 36500;
@@ -610,7 +610,11 @@
610
610
  const w13 = clamp(parameters[13] || 0, clip[13][0], clip[13][1]);
611
611
  const w14 = clamp(parameters[14] || 0, clip[14][0], clip[14][1]);
612
612
  const value = -(Math.log(w11) + Math.log(Math.pow(2, w13) - 1) + w14 * 0.3) / numRelearningSteps;
613
- const w17_w18_ceiling = clamp(roundTo(value, 8), 0.01, W17_W18_Ceiling);
613
+ const w17_w18_ceiling = clamp(
614
+ roundTo(Math.sqrt(Math.max(value, 0)), 8),
615
+ 0.01,
616
+ W17_W18_Ceiling
617
+ );
614
618
  if (clip[17]) clip[17] = [clip[17][0], w17_w18_ceiling];
615
619
  if (clip[18]) clip[18] = [clip[18][0], w17_w18_ceiling];
616
620
  }