Unbounded isapprox
Currently, isapprox relative tolerance is based on the maximum of interval endpoints. This makes a lot of sense for finite intervals, but is kinda weird for infinities:
julia> (-1e10..Inf) ≈ (1e10..Inf)
true
Do you think this can be fixed/improved in a consistent manner?
I guess the real question is what is "relative" wrt what?
I assume you are happy that (0..1) ≈ (1e(-13)..1) returns true even though 0 ≈ 1e(-13) returns false. So this means we can't just check if both endpoints are approximately equal.
But I agree your example returning true is not right.
Yes, I think the behavior for finite intervals is correct and totally expected.
I guess the real question is what is "relative" wrt what?
Agree, and don't have a solution ready. That's why an issue and not a PR.
It doesn't actually help with this problem but looking at the code the choice of relative tolerance looks wrong: I think maxabs should be based on the widths of the intervals not the size of the endpoints...
Then we'd get weird situations when L1 ≈ L2 and R1 ≈ R2, but (L1..R1) ≉ (L2..R2).
Eg for 1e10...(1e10+3) and (1e10+1)..(1e10+2).
I don't think that's a "weird situation" at all... and in fact those two intervals do not look approximately equal.
What about 1e10..(1e10+1) and nextfloat(1e10)..(1e10+1)?