Hi, I have noticed that 1//0 does not throw any errors, which is a bit unexpected. Even more, inv(0//1) is 1//0. On the other hand, 0//0 throws an argument error (understandably). Is this the intended behavior?
My current understanding is that 1//0 mimics the behavior of Inf. However, the main difference is that 0*Inf is a NaN, whereas 0*(1//0) throws an error. I encountered this situation when looking at this issue in StaticArrays.jl, where A=@SMatrix zeros(5,5);det(A) works fine and A=@SMatrix zeros(Rational,5,5);det(A) does not for the reason stated above.
1//0 being analogous to +Inf doesn’t mean Rational has to comply with IEEE 754, and num and den doesn’t have room for NaNs. Rational also throws an error upon num overflow instead of going to ±Inf (I suppose 1//0 and -1//0 for Rational), and Integer doesn’t (usually) have a negative zero.