-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Treat Fraction as a real value in mixed arithmetic operations with complex #119838
Comments
…perations with complex
PS: But thank you for reminding me that I should fix also the "complex op Fraction" case in my pr:) Edit: After looking on the code, sorry - false alert. |
+1 |
…ons with complex (GH-119839)
…perations with complex (pythonGH-119839)
…perations with complex (pythonGH-119839)
…perations with complex (pythonGH-119839)
…perations with complex (pythonGH-119839)
In arithmetic operations, if one of operands is a
Fraction
, and the other operand is acomplex
or anumbers.Complex
, the fraction is implicitly converted to acomplex
. Third-party types implementing thenumbers.Complex
interface can distinguish between real and complex operands. In future we can support the mixed real-complex arithmetic also for the builtincomplex
type. A fraction is a real value, so it makes sense to convert it tofloat
instead ofcomplex
in such cases.Linked PRs
The text was updated successfully, but these errors were encountered: