-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fixing the //(x::Number, y::Complex) one liner to accomodate silent overflows and division by zero/infinity #56478
base: master
Are you sure you want to change the base?
Conversation
applied scaling while calculating absolute values in order to prevent overflow at any step
doctest fails:
|
fixed the overflow issue in my solution, implemented iszero and isinf wherever possible for lighter implementation
Hey, the overflow was due to converting complex floats to rationals, I have instead come up with a solution requiring no rational conversions :) |
okay, so I have added tests from #53453 (they work fine), removed the redundancy related to isinf(y) being true only for rational y, added a divide error for division by complex(0), and removed type instability from function //(x::Number, y::Complex{<:Integer}). |
added comments that were deleted unintentionally
fixed uint test which failed before
attempt to remove ambiguity which seems to be affecting build tests
fixes ambiguity by merging functions
type instability fixed
typ instability fix attempt
Bump |
Fixes #53435 Fixes #56245. I have added conditions for division by zero and infinite handling in the case of complex numbers and overflow handling in the case of integer-based complex numbers. Further, I have added a few tests for the same :)