Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #20: long times break with Substack's Gamma #21

Merged
merged 1 commit into from Oct 2, 2023
Merged

Conversation

fasiha
Copy link
Owner

@fasiha fasiha commented Oct 2, 2023

For quizzes much longer than a model halflife, Substack's Gamma can return NaNs during _updateRecallSingle 馃槶

(Note this doesn't happen with stdlib's more accurate Gamma function 馃挭!)

This PR fixes this by switching to the log domain if the default linear-domain calculation fails to converge. For the examples in #20, as well as much more extreme examples (per the new unit test, when the quiz is 1e5 times the halflife!), this is sufficient for the update step to converge.

New minor release version is included but needs to be rebuilt before release.

@fasiha fasiha merged commit 074a47d into gh-pages Oct 2, 2023
@fasiha fasiha deleted the fix-20-long-ts branch October 2, 2023 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant