Skip to content

Commit 1f2b5e0

Browse files
Update base/float.jl
Co-authored-by: Lilith Orion Hafner <[email protected]>
1 parent 0fcac7a commit 1f2b5e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/float.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ function hash(x::Real, h::UInt)
695695
left = top_set_bit(abs(num)) + pow
696696
# 2^-1074 is the minimum Float64 so if the power is smaller, not a Float64
697697
if -1074 <= pow
698-
if pow >= 0 # if pow is negative, it isn't an integer
698+
if 0 <= pow # if pow is non-negative, it is an integer
699699
left <= 63 && return hash(Int64(num) << Int(pow), h)
700700
left <= 64 && !signbit(num) && return hash(UInt64(num) << Int(pow), h)
701701
end # typemin(Int64) handled by Float64 case

0 commit comments

Comments
 (0)