-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Bug with range() and unsigned indices #44895
Copy link
Copy link
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcorrectness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwingBugs that are likely to lead to incorrect results in user code without throwingrangesEverything AbstractRangeEverything AbstractRange
Milestone
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcorrectness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwingBugs that are likely to lead to incorrect results in user code without throwingrangesEverything AbstractRangeEverything AbstractRange
The snippet
gives
3.6893488147419105e18instead of the expected-1.0.The problem seems to be
julia/base/range.jl
Line 939 in 0d29712
UInt(1) - 6underflows.