Comparing `ℵ₀` and `∞`
putianyi889 opened this issue · comments
Tianyi Pu commented
Does these mean ℵ₀
is strictly greater than ∞
while they are also equal? What is the purpose behind it?
Infinities.jl/test/test_cardinality.jl
Line 22 in 0972ead
Infinities.jl/test/test_cardinality.jl
Line 43 in 0972ead
Infinities.jl/test/test_cardinality.jl
Lines 77 to 78 in 0972ead
https://github.com/JuliaLang/julia/blob/43d7f881f8e26eb4bb7ef3d6f84b378d28125325/base/promotion.jl#L532-L533
Sheehan Olver commented
Where do you get "strictly greater than"?
Sheehan Olver commented
It actually says "not strictly greater than"
Tianyi Pu commented
because Julia base defines min
and max
as
min(x,y) = ifelse(y < x, y, x)
max(x,y) = ifelse(y < x, x, y)
so if min(x,y) == min(y,x) == x
then x
must be strictly less.
Sheehan Olver commented
Not always:
julia> min(1.0, 1)
1.0
julia> min(1, 1.0)
1.0
Tianyi Pu commented
It's because of promotion
min(x::Real, y::Real) = min(promote(x,y)...) # promotion.jl