Skip to content

fix overflow and undeflow for @fastmath exp#42747

Merged
DilumAluthge merged 3 commits intoJuliaLang:masterfrom
oscardssmith:fix-fastmath-exp-overflow
Oct 22, 2021
Merged

fix overflow and undeflow for @fastmath exp#42747
DilumAluthge merged 3 commits intoJuliaLang:masterfrom
oscardssmith:fix-fastmath-exp-overflow

Conversation

@oscardssmith
Copy link
Copy Markdown
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 maths Mathematical functions bugfix This change fixes an existing bug backport 1.7 labels Oct 21, 2021
@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Oct 21, 2021
@giordano
Copy link
Copy Markdown
Member

Add tests maybe?

@DilumAluthge DilumAluthge merged commit 609a4a0 into JuliaLang:master Oct 22, 2021
@DilumAluthge DilumAluthge removed the 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 <oscar.smith@juliacomputing.com>
(cherry picked from commit 609a4a0)
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
Co-authored-by: oscarddssmith <oscar.smith@juliacomputing.com>
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Co-authored-by: oscarddssmith <oscar.smith@juliacomputing.com>
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 maths Mathematical functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants