Skip to content

Commit a501ade

Browse files
authored
Fix ambiguities in ℵ₀ + ∞ (#18)
1 parent 577adfb commit a501ade

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Infinities"
22
uuid = "e1ba4f0e-776d-440f-acd9-e1d2e9742647"
33
authors = ["Sheehan Olver <[email protected]>"]
4-
version = "0.1.3"
4+
version = "0.1.4"
55

66
[compat]
77
julia = "1"

src/cardinality.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ for op in (:+, :-)
163163
$op(::InfiniteCardinal, x::Number) = $op(∞, x)
164164
$op(x::RealInfinity, ::InfiniteCardinal) = $op(x, ∞)
165165
$op(::InfiniteCardinal, x::RealInfinity) = $op(∞, x)
166+
$op(::Infinity, ::InfiniteCardinal) = $op(∞, ∞)
167+
$op(::InfiniteCardinal, ::Infinity) = $op(∞, ∞)
166168
end
167169
end
168170

test/test_cardinality.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ using Infinities, Base64, Base.Checked, Test
102102
@test ℵ₀ + 5.1
103103
@test 5.1 + ℵ₀
104104
@test 5.1 - ℵ₀ -
105-
105+
106+
@test ℵ₀ +==
107+
@test+ ℵ₀ ==
106108
@test ℵ₀ + RealInfinity() ==
107109
@test ℵ₀ - (-∞) ==
108110
@test RealInfinity() + ℵ₀ ==

0 commit comments

Comments
 (0)