Skip to content

Commit 9356115

Browse files
committed
Make a control flow statement slightly easier to read in float.jl.
1 parent f0f19fd commit 9356115

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/float.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ function convert(::Type{Float16}, val::Float32)
142142
# getting truncated anyway so "rounding" it might not matter
143143
nextbit = (f >> (sh-1)) & 1
144144
if nextbit != 0
145-
if h&1 == 1 || # round halfway to even
146-
(f & ((1<<(sh-1))-1)) != 0 # check lower bits
145+
# Round halfway to even or check lower bits
146+
if h&1 == 1 || (f & ((1<<(sh-1))-1)) != 0
147147
h += 1
148148
end
149149
end

0 commit comments

Comments
 (0)