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

BUG: Fix powm1 test case #17870

Closed
wants to merge 1 commit into from
Closed

BUG: Fix powm1 test case #17870

wants to merge 1 commit into from

Conversation

mborland
Copy link
Contributor

Reference issue

No open issue. Related PRs are #17855 and #17432.

What does this implement/fix?

Fix test case that now fails because of changes made in #17855. -INF**2 - 1 should be -INF not +INF

Additional information

Failure can be found here.

@WarrenWeckesser
Copy link
Member

Why should the result be -inf? Why wouldn't (-inf)**2 - 1 be +inf?

@WarrenWeckesser
Copy link
Member

WarrenWeckesser commented Jan 27, 2023

I think I may have merged #17855 too quickly. When the input x is negative (including x = -inf) and there is an overflow, the return value depends on parity of the integer y.

@mborland
Copy link
Contributor Author

I realize looking at that it needs the whole control flow from: https://en.cppreference.com/w/cpp/numeric/math/pow

@mborland
Copy link
Contributor Author

I think this is easiest if I fork Nicholas' PR which has all of the Boost changes in it already to validate the correct behaviors

@mborland mborland closed this Jan 27, 2023
@mborland mborland deleted the powm1_test branch January 27, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants