Skip to content
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

Make sure range(start; step, length) uses TwicePrecision when possible #44313

Merged
merged 5 commits into from
Feb 23, 2022

Conversation

jipolanco
Copy link
Contributor

The twiceprecision variant of range_start_step_length is now called whenever step is a IEEEFloat = Union{Float16, Float32, Float64}.

Fixes #44292.

This is just for consistency with the rest of the code in
base/twiceprecision.jl.

Note that it doesn't change anything, since IEEEFloat = Union{Float16,
Float32, Float64}.
@fredrikekre fredrikekre added backport 1.8 Change should be backported to release-1.8 bugfix This change fixes an existing bug ranges Everything AbstractRange labels Feb 23, 2022
@fredrikekre fredrikekre requested a review from vtjnash February 23, 2022 09:01
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Could you also fix the reverse direction:

julia> range(stop=0, step=0.2, length=5) |> typeof
StepRangeLen{Float64, Float64, Float64, Int64}

@jipolanco
Copy link
Contributor Author

Should be good now.

@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Feb 23, 2022
@fredrikekre fredrikekre merged commit 1b47efb into JuliaLang:master Feb 23, 2022
@jipolanco jipolanco deleted the jip/range-twiceprecision branch February 23, 2022 20:57
@oscardssmith oscardssmith removed the merge me PR is reviewed. Merge when all tests are passing label Feb 23, 2022
KristofferC pushed a commit that referenced this pull request Feb 24, 2022
@KristofferC KristofferC mentioned this pull request Feb 24, 2022
47 tasks
staticfloat pushed a commit to JuliaCI/julia-buildkite-testing that referenced this pull request Mar 2, 2022
KristofferC pushed a commit that referenced this pull request Mar 7, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
@KristofferC KristofferC removed the backport 1.8 Change should be backported to release-1.8 label Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug ranges Everything AbstractRange
Projects
None yet
Development

Successfully merging this pull request may close these issues.

range(start::Int; step, length) no longer uses TwicePrecision
5 participants