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

don't throw DomainError for negative integer powers of ±1 #18342

Merged
merged 2 commits into from
Sep 5, 2016

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented Sep 3, 2016

As discussed in #3024, #12822, we throw a DomainError for e.g. 2^-2. However, we shouldn't throw an error for 1^-2 or (-1)^-2, since the result is an integer.

@stevengj stevengj added the domain:maths Mathematical functions label Sep 3, 2016
@vtjnash vtjnash merged commit c7ae73c into JuliaLang:master Sep 5, 2016
@stevengj stevengj deleted the powinv1 branch September 5, 2016 11:37
mfasi pushed a commit to mfasi/julia that referenced this pull request Sep 5, 2016
…18342)

* don't throw DomainError for negative integer powers of ±1

* fix replutil test that was expecting 1^(-1) to fail
@StefanKarpinski StefanKarpinski added the needs news A NEWS entry is required for this change label Sep 6, 2016
@StefanKarpinski StefanKarpinski added this to the 0.6.0 milestone Sep 6, 2016
Sacha0 added a commit to Sacha0/julia that referenced this pull request May 12, 2017
Sacha0 added a commit to Sacha0/julia that referenced this pull request May 13, 2017
Sacha0 added a commit to Sacha0/julia that referenced this pull request May 13, 2017
Sacha0 added a commit to Sacha0/julia that referenced this pull request May 13, 2017
@Sacha0 Sacha0 removed the needs news A NEWS entry is required for this change label May 13, 2017
tkelman pushed a commit that referenced this pull request May 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:maths Mathematical functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants