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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix exp of large negative Float16 #42688

Merged
merged 3 commits into from
Oct 19, 2021
Merged

Conversation

oscardssmith
Copy link
Member

While fixing #42555, I broke exp(Float16(-100)). TLDR is that with the change there, we weren't always correctly hitting the branch to return 0 when we should have. This time I promise I've actually tested exp2 exp and exp10 on my computer on all Float16 values before making the PR.

@oscardssmith oscardssmith added maths Mathematical functions bugfix This change fixes an existing bug embarrassing-bugfix Whoops! backport 1.7 labels Oct 18, 2021
@oscardssmith oscardssmith added this to the 1.7 milestone Oct 18, 2021
@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Oct 18, 2021
@KristofferC
Copy link
Member

Looks like the tests need updating for NaN.

@oscardssmith
Copy link
Member Author

OK. tests actually fixed. It turns out we define eps(Inf)=NaN, which while kind of true isn't especially useful.

@KristofferC KristofferC merged commit 02f7861 into JuliaLang:master Oct 19, 2021
@oscardssmith oscardssmith deleted the fix-exp16 branch October 19, 2021 12:10
KristofferC pushed a commit that referenced this pull request Oct 19, 2021
@DilumAluthge DilumAluthge removed the merge me PR is reviewed. Merge when all tests are passing label Oct 22, 2021
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug embarrassing-bugfix Whoops! maths Mathematical functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants