File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 11name = " Infinities"
22uuid = " e1ba4f0e-776d-440f-acd9-e1d2e9742647"
33authors = [" Sheehan Olver <solver@mac.com>" ]
4- version = " 0.1.8 "
4+ version = " 0.1.9 "
55
66[compat ]
77Aqua = " 0.8"
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ angle(x::RealInfinity) = π*signbit(x)
6868string (y:: RealInfinity ) = signbit (y) ? " -∞" : " +∞"
6969show (io:: IO , y:: RealInfinity ) = print (io, string (y))
7070
71+ Base. to_index (i:: RealInfinity ) = convert (Integer, i)
72+
7173# ######
7274# ComplexInfinity
7375# ######
Original file line number Diff line number Diff line change @@ -203,6 +203,8 @@ using Aqua
203203 @test convert (Float16, - ∞) ≡ Float16 (- ∞) ≡ - Inf16
204204 @test convert (BigFloat, - ∞):: BigFloat == BigFloat (- ∞):: BigFloat == - BigFloat (Inf )
205205 end
206+
207+ @test Base. to_index (RealInfinity ()) ≡ ℵ₀
206208 end
207209
208210 @testset " ComplexInfinity" begin
You can’t perform that action at this time.
0 commit comments