-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
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
range(start::Int; step, length)
no longer uses TwicePrecision
#44292
Labels
Milestone
Comments
jipolanco
added a commit
to JuliaVTK/WriteVTK.jl
that referenced
this issue
Feb 21, 2022
dkarrasch
added
ranges
Everything AbstractRange
regression
Regression in behavior compared to a previous version
labels
Feb 21, 2022
That sounds right. You are right that I neglected to properly update the |
Great thanks, I'll make a PR then. |
fredrikekre
pushed a commit
that referenced
this issue
Feb 23, 2022
staticfloat
pushed a commit
to JuliaCI/julia-buildkite-testing
that referenced
this issue
Mar 2, 2022
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Mar 8, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Not sure if this is considered a regression, but the following:
returns a
StepRangeLen{Float64, Int64, Float64, Int64}
on Julia master / 1.8, while it used to return aStepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}
on Julia 1.7.I guess this change of behaviour is in conflict with the statement in the
range
docs:Note that this doesn't happen when
start
is a float (more specifically, it must be aUnion{Float16,Float32,Float64}
and have the same type asstep
), and therefore changing0
by0.0
in the above example works around the issue (so that therange_start_step_length
function defined in twiceprecision.jl is called).This change of behaviour seems to be introduced by #43059, and more precisely in the new definition of the
range_start_step_length
function copied below. From what I understand, that PR aimed at fixing issues dealing with integer ranges (but I might be wrong about this...). In any case, the branchif stop isa Signed
is always skipped ifstep
is a float, in which casestop
is also a float.So, I guess an easy fix would be to add a specialisation such as:
which will end up calling the appropriate function from
twiceprecision.jl
. Is there any reason why this wouldn't be a good idea?The text was updated successfully, but these errors were encountered: