-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
BUG: clamp(typemax(UInt64), Int64)
errors
#54022
Comments
The same happens for bit sizes 8, 16, 32, 64, 128. |
It's due to Lines 99 to 102 in e9a24d4
Since convert(UInt64, typemax(Int64))
convert(UInt64, typemin(Int64))
convert(UInt64, typemax(UInt64)) with the second one throwing the reported error since |
Ternary is nearly always faster and usually generates better code |
See my comment in #54038. |
Fixes JuliaLang#54022 Co-authored-by: Klaus Crusius <KlausC@users.noreply.github.com>
Fixes JuliaLang#54022 Co-authored-by: Klaus Crusius <KlausC@users.noreply.github.com>
Fixes JuliaLang#54022 Co-authored-by: Klaus Crusius <KlausC@users.noreply.github.com>
Fixes JuliaLang#54022 Co-authored-by: Klaus Crusius <KlausC@users.noreply.github.com>
Fixes JuliaLang#54022 Co-authored-by: Klaus Crusius <KlausC@users.noreply.github.com>
Fixes #54022 Co-authored-by: Klaus Crusius <KlausC@users.noreply.github.com>
The call
clamp(typemax(UInt64), Int64)
should returntypemax(Int64)
but throwsInexactError
.The text was updated successfully, but these errors were encountered: