julia
7bd9ea2d - doc: clarify edge cases when converting rational to float (#45220)

Commit
4 years ago
doc: clarify edge cases when converting rational to float (#45220) We state that for any integral `a` and `b`, the expression `isequal(float(a//b), a/b)` is true unless `a` and `b` are zero. This is confusing because there are two such cases, which both require only one of `a` or `b` to be zero. The first case is the division by zero and the second case uses a negative divisor to make float division evaluate to -0.0 which has no equivalent rational number: julia> isequal(float(0//-1), 0/-1) false Clarify the conditions of the exceptional cases.
Author
Parents
Loading