Skip to content

Commit

Permalink
Fix ambigiuity in ℵ₀ - (-∞) (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty authored Sep 19, 2021
1 parent 4c038b0 commit 577adfb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Infinities"
uuid = "e1ba4f0e-776d-440f-acd9-e1d2e9742647"
authors = ["Sheehan Olver <[email protected]>"]
version = "0.1.2"
version = "0.1.3"

[compat]
julia = "1"
Expand Down
2 changes: 2 additions & 0 deletions src/cardinality.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ for op in (:+, :-)
@eval begin
$op(x::Number, ::InfiniteCardinal) = $op(x, ∞)
$op(::InfiniteCardinal, x::Number) = $op(∞, x)
$op(x::RealInfinity, ::InfiniteCardinal) = $op(x, ∞)
$op(::InfiniteCardinal, x::RealInfinity) = $op(∞, x)
end
end

Expand Down
4 changes: 4 additions & 0 deletions test/test_cardinality.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ using Infinities, Base64, Base.Checked, Test
@test ℵ₀ + 5.1
@test 5.1 + ℵ₀
@test 5.1 - ℵ₀ -

@test ℵ₀ + RealInfinity() ==
@test ℵ₀ - (-∞) ==
@test RealInfinity() + ℵ₀ ==
end

@testset "fld/cld/div/mod" begin
Expand Down

2 comments on commit 577adfb

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/45177

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.3 -m "<description of version>" 577adfbf1cef2c462ed28f04c6645630fb659e93
git push origin v0.1.3

Please sign in to comment.