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

searchsortedfirst(a::Range{Float64}, x) has overflow issues #8866

Closed
binarybana opened this issue Oct 31, 2014 · 0 comments
Closed

searchsortedfirst(a::Range{Float64}, x) has overflow issues #8866

binarybana opened this issue Oct 31, 2014 · 0 comments
Labels
kind:bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@binarybana
Copy link
Contributor

julia> searchsortedfirst(500:1.0:600, 1.0e20)
ERROR: InexactError()
 in searchsortedfirst at sort.jl:191

Because of an iround call on this line. Yet the comparison is well within normal ranges for Float64 values.

I'm not sure about the 'best' way to fix this, maybe add an else if x > last(a) branch before this one?

@ViralBShah ViralBShah added the kind:bug Indicates an unexpected problem or unintended behavior label Nov 7, 2014
@ViralBShah ViralBShah added this to the 0.4 milestone Nov 7, 2014
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
Projects
None yet
Development

No branches or pull requests

2 participants