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 overflow and undeflow for @fastmath exp #42747

Merged
merged 3 commits into from
Oct 22, 2021

Conversation

oscardssmith
Copy link
Member

Before

julia> @fastmath exp(1000.0)
-6.096081764721242e-183

julia> @fastmath exp(-1000.0)
-1.6403979450983092e182

After

julia> @fastmath exp(1000.0)
Inf

julia> @fastmath exp(-1000.0)
0.0

@oscardssmith oscardssmith added domain:maths Mathematical functions kind:bugfix This change fixes an existing bug backport 1.7 labels Oct 21, 2021
@vtjnash vtjnash added the status:merge me PR is reviewed. Merge when all tests are passing label Oct 21, 2021
@giordano
Copy link
Contributor

Add tests maybe?

@DilumAluthge DilumAluthge merged commit 609a4a0 into JuliaLang:master Oct 22, 2021
@DilumAluthge DilumAluthge removed the status:merge me PR is reviewed. Merge when all tests are passing label Oct 22, 2021
@oscardssmith oscardssmith deleted the fix-fastmath-exp-overflow branch October 22, 2021 11:56
KristofferC pushed a commit that referenced this pull request Oct 22, 2021
Co-authored-by: oscarddssmith <[email protected]>
(cherry picked from commit 609a4a0)
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
domain:maths Mathematical functions kind:bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants