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

Repair rand{T<:Integer}(r::Range1{T}) for signed types. Closes #3004. #3008

Merged
merged 1 commit into from
May 3, 2013

Conversation

GunnarFarneback
Copy link
Contributor

This pull request restores the rand(r::Range1) function to the state before 6e6b057#base/random.jl to solve the regression reported in #3004. There are other edge case issues in the function but I'll come back to those at a later time.

I'm not sure about the value of the testcase. Generating 100000 random numbers to test this specific problem is maybe not motivated. What this patch really needs is careful code review.

StefanKarpinski added a commit that referenced this pull request May 3, 2013
Repair rand{T<:Integer}(r::Range1{T}) for signed types. Closes #3004.
@StefanKarpinski StefanKarpinski merged commit d447880 into JuliaLang:master May 3, 2013
@StefanKarpinski
Copy link
Sponsor Member

I merged this because the use of abs was clearly wrong. This at least appears to work. We still need to look over this carefully to make sure it seems truly correct.

@GunnarFarneback GunnarFarneback deleted the rand_from_range branch May 3, 2013 19:41
@ViralBShah ViralBShah added the domain:randomness Random number generation and the Random stdlib label Nov 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:randomness Random number generation and the Random stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants