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

DivideError when dividing a zero rational by a complex number #15920

Closed
yuyichao opened this issue Apr 18, 2016 · 4 comments
Closed

DivideError when dividing a zero rational by a complex number #15920

yuyichao opened this issue Apr 18, 2016 · 4 comments

Comments

@yuyichao
Copy link
Contributor

This happens in the numbers test on #15917

Slightly simplified repro:

julia> Rational(0, 3) / Complex(3, 2)
ERROR: DivideError: integer division error
 [inlined code] from ./rational.jl:19
 in +(::Rational{Int64}, ::Rational{Int64}) at ./rational.jl:179
 [inlined code] from ./complex.jl:4
 in inv(::Complex{Rational{Int64}}) at ./complex.jl:118
 in /(::Rational{Int64}, ::Complex{Int64}) at ./rational.jl:191
 in eval(::Module, ::Any) at ./boot.jl:237
@yuyichao
Copy link
Contributor Author

Wow, the offending method is really old ... 93710f3

@andreasnoack
Copy link
Member

Even older since that commit is just some cleanup. I think this is the real offender d0ac203. By the way, it looks as if you, in the summer of 2010, could muliply with white space.

@yuyichao
Copy link
Contributor Author

yuyichao commented Apr 18, 2016

The bad one is the /(::Rational, ::Complex) which is added (agrees with the commit message) by the commit I linked. The clean up done in that commit is actually for another function....

@andreasnoack
Copy link
Member

Yes, my bad. I was carried away with the Julia archeology.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants