-
Notifications
You must be signed in to change notification settings - Fork 1.3k
(-2) ** 0.5 yields NaN #1986
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
Labels
C-compat
A discrepancy between RustPython and CPython
Comments
CPython:
RustPython:
|
I am handling this issue :) |
minoring
added a commit
to minoring/RustPython
that referenced
this issue
Jul 27, 2020
Result: RustPython gives `float.__rpow__(0.5, -2) (0.00000000000000008659560562354934+1.4142135623730951j)` CPython 3.85 gives `>>> float.__rpow__(0.5, -2) (8.659560562354934e-17+1.4142135623730951j)`
minoring
added a commit
to minoring/RustPython
that referenced
this issue
Jul 27, 2020
Result: RustPython gives `float.__rpow__(0.5, -2) (0.00000000000000008659560562354934+1.4142135623730951j)` CPython 3.85 gives `>>> float.__rpow__(0.5, -2) (8.659560562354934e-17+1.4142135623730951j)`
minoring
added a commit
to minoring/RustPython
that referenced
this issue
Jul 27, 2020
Result: RustPython gives `float.__rpow__(0.5, -2) (0.00000000000000008659560562354934+1.4142135623730951j)` CPython 3.85 gives `>>> float.__rpow__(0.5, -2) (8.659560562354934e-17+1.4142135623730951j)`
minoring
added a commit
to minoring/RustPython
that referenced
this issue
Jul 28, 2020
Result: RustPython gives `float.__rpow__(0.5, -2) (0.00000000000000008659560562354934+1.4142135623730951j)` CPython 3.85 gives `>>> float.__rpow__(0.5, -2) (8.659560562354934e-17+1.4142135623730951j)`
youknowone
pushed a commit
that referenced
this issue
Jul 29, 2020
Fix #1986 which (-2) ** 0.5 yields NaN. Result: RustPython gives `float.__rpow__(0.5, -2) (0.00000000000000008659560562354934+1.4142135623730951j)` CPython 3.85 gives `>>> float.__rpow__(0.5, -2) (8.659560562354934e-17+1.4142135623730951j)`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature
non-integer power of negative numbers.
Python Documentation
The text was updated successfully, but these errors were encountered: