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

searchsorted(Float64[], 0.0) #7916

Closed
StefanKarpinski opened this issue Aug 8, 2014 · 3 comments
Closed

searchsorted(Float64[], 0.0) #7916

StefanKarpinski opened this issue Aug 8, 2014 · 3 comments
Labels
kind:bug Indicates an unexpected problem or unintended behavior kind:regression Regression in behavior compared to a previous version

Comments

@StefanKarpinski
Copy link
Sponsor Member

On master:

julia> searchsorted(Float64[], 0.0)
ERROR: BoundsError()
 in searchsorted at sort.jl:163
 in searchsorted at sort.jl:204

On 0.2:

julia> searchsorted(Float64[], 0.0)
1:0

The old behavior was intentional and correct, so this is a regression.

@StefanKarpinski
Copy link
Sponsor Member Author

@tanmaykm, you seem to be using the internal methods of searchsorted [e0dd47d, 1254792, a4ff37e] – am I correct that this is only inside of base, meaning that we can count on the calling code being correct (i.e. if it isn't it's our fault)?

@tanmaykm
Copy link
Member

tanmaykm commented Aug 8, 2014

Yes, the calling code does the necessary checks to be correct and this is used only inside base.

@StefanKarpinski
Copy link
Sponsor Member Author

Ok, that's good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior kind:regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

2 participants