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

Taking the power of a complex zero results in NaN instead of 0 #526

Open
lokedhs opened this issue Feb 8, 2024 · 1 comment
Open

Taking the power of a complex zero results in NaN instead of 0 #526

lokedhs opened this issue Feb 8, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@lokedhs
Copy link

lokedhs commented Feb 8, 2024

To reproduce:

ComplexField.power(Complex(0.0), Complex(2.0))

I created my own version of this function and ended up with the same problem, which was caused by me not testing for the special case of the base being zero. After I fixed it, I still failed on this:

ComplexField.power(Complex(-0.0), Complex(2.0))

I mention this here since in case you want to add a special test case for this.

@SPC-code
Copy link
Contributor

SPC-code commented Feb 8, 2024

Thanks. I've reproduced it and fixed in the last commit. It would be great if you could add more tests. Even better if you could create pull/merge requests.

@SPC-code SPC-code added the bug Something isn't working label Feb 8, 2024
@SPC-code SPC-code self-assigned this Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants