Skip to content

Commit

Permalink
Update base/float.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Lilith Orion Hafner <[email protected]>
  • Loading branch information
oscardssmith and LilithHafner committed Jul 24, 2023
1 parent 0fcac7a commit 1f2b5e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/float.jl
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ function hash(x::Real, h::UInt)
left = top_set_bit(abs(num)) + pow
# 2^-1074 is the minimum Float64 so if the power is smaller, not a Float64
if -1074 <= pow
if pow >= 0 # if pow is negative, it isn't an integer
if 0 <= pow # if pow is non-negative, it is an integer
left <= 63 && return hash(Int64(num) << Int(pow), h)
left <= 64 && !signbit(num) && return hash(UInt64(num) << Int(pow), h)
end # typemin(Int64) handled by Float64 case
Expand Down

0 comments on commit 1f2b5e0

Please sign in to comment.