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 literal-pow to return the right type when the base is -1 #53736

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add tests
  • Loading branch information
oscardssmith committed Mar 14, 2024
commit a5f8b2a0b7ed69a99dbd5adae9ab21e3d7a80ba5
7 changes: 7 additions & 0 deletions test/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,13 @@ end
# two cases where we have observed > 1 ULP in the past
@test 0.0013653274095082324^-97.60372292227069 == 4.088393948750035e279
@test 8.758520413376658e-5^70.55863059215994 == 5.052076767078296e-287
# test literal pow for base = -1
@test (-1)^(-1) === (-1)^((-1,)[1])
@test (-1)^(-2) === (-1)^((-2,)[1])
@test (-1)^(-3) === (-1)^((-3,)[1])
@test (-1)^(1) === (-1)^((1,)[1])
@test (-1)^(2) === (-1)^((2,)[1])
@test (-1)^(3) === (-1)^((3,)[1])
end

# Test that sqrt behaves correctly and doesn't exhibit fp80 double rounding.
Expand Down