Open
Description
Currently this cannot be constructed with colons.
julia> 0.0:0.0:∞
ERROR: ArgumentError: InfStepRange must have infinite length
Stacktrace:
[1] (::Colon)(start::Float64, step::Float64, stop::Infinities.Infinity)
@ InfiniteArrays C:\Users\pty\.julia\dev\InfiniteArrays\src\infrange.jl:19
[2] top-level scope
@ REPL[40]:1
It can be generated using the type constructor or manipulating ranges.
julia> (1.0:∞)-(1.0:∞)
0.0:0.0:+∞
julia> InfStepRange(0.0,0.0)
0.0:0.0:+∞
julia> InfStepRange(0,0)
0:0:+∞
This is the same strategy that Julia Base uses. StepRangeLen is well defined for this purpose, while InfStepRange is ambiguous on what the stop
should be.
julia> (1.0:5.0)-(1.0:5.0)
StepRangeLen(0.0, 0.0, 5)
julia> (1:5)-(1:5)
StepRangeLen(0, 0, 5)
InfUnitRange has a different pipeline.
julia> (1:∞)-(1:∞)
ℵ₀-element Fill{Int64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}} with indices OneToInf(), with entries equal to 0
Metadata
Metadata
Assignees
Labels
No labels