We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e9e840 commit b9fda22Copy full SHA for b9fda22
src/fixed.jl
@@ -169,7 +169,7 @@ Base.unitrange_last(start::F, stop::F) where {F<:Fixed} =
169
Base.unsafe_length(r::AbstractUnitRange{F}) where {F <: Fixed{<:Union{SShorterThanInt,Int},f}} where {f} =
170
((Int(reinterpret(last(r))) - Int(reinterpret(first(r)))) >> f) + 1
171
Base.unsafe_length(r::AbstractUnitRange{F}) where {F <: Fixed{T,f}} where {T<:Signed,f} =
172
- T(reinterpret(last(r)) >> f - reinterpret(first(r)) >> f) + oneunit(T)
+ floor(T, last(r)) - floor(T, first(r)) + oneunit(T)
173
Base.length(r::AbstractUnitRange{F}) where {F <: Fixed{<:SShorterThanInt,f}} where {f} =
174
Base.unsafe_length(r)
175
Base.length(r::AbstractUnitRange{F}) where {F <: Fixed{T,f}} where {T<:Signed,f} =
0 commit comments