We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reverse!
OffsetArray
julia> v = [1:4;] 4-element Vector{Int64}: 1 2 3 4 julia> reverse!(v, firstindex(v)) 4-element Vector{Int64}: 4 3 2 1 julia> vo = OffsetArray([1:4;], typemax(Int)-4) 4-element OffsetArray(::Vector{Int64}, 9223372036854775804:9223372036854775807) with eltype Int64 with indices 9223372036854775804:9223372036854775807: 1 2 3 4 julia> reverse!(vo, firstindex(vo)) 4-element OffsetArray(::Vector{Int64}, 9223372036854775804:9223372036854775807) with eltype Int64 with indices 9223372036854775804:9223372036854775807: 1 2 3 4 julia> versioninfo() Julia Version 1.9.0-DEV.866 Commit 8419acc5ba* (2022-06-30 02:57 UTC) Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 8 × 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-14.0.5 (ORCJIT, tigerlake) Threads: 1 on 8 virtual cores Environment: LD_LIBRARY_PATH = :/usr/lib/x86_64-linux-gnu/gtk-3.0/modules JULIA_EDITOR = vim
This possibly happens because there is an overflow in
julia/base/array.jl
Line 1891 in 8419acc
div(s+n-1, 2)
julia> s = firstindex(vo) 9223372036854775804 julia> n = lastindex(vo) 9223372036854775807 julia> div(s + n - 1, 2) -3
The text was updated successfully, but these errors were encountered:
Should we include something like Base.Sort.midpoint in Base? This seems useful, and may help avoid such overflow bugs.
Base.Sort.midpoint
Base
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
This possibly happens because there is an overflow in
julia/base/array.jl
Line 1891 in 8419acc
while evaluating
div(s+n-1, 2)
.The text was updated successfully, but these errors were encountered: