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 879e3e6 commit 6e9e840Copy full SHA for 6e9e840
src/fixed.jl
@@ -167,7 +167,7 @@ Base.unitrange_last(start::F, stop::F) where {F<:Fixed} =
167
168
# Range lengths
169
Base.unsafe_length(r::AbstractUnitRange{F}) where {F <: Fixed{<:Union{SShorterThanInt,Int},f}} where {f} =
170
- Int(reinterpret(last(r)) >> f - reinterpret(first(r)) >> f) + 1
+ ((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)
173
Base.length(r::AbstractUnitRange{F}) where {F <: Fixed{<:SShorterThanInt,f}} where {f} =
0 commit comments