Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
nine_k
· 9y ago · 0 comments
-0 is "below zero, but for so little that we cannot represent", so it's outside [0, 1].
Comments
[–]
kr7
9y ago
Though for the purposes of comparisons, -0 and +0 are the same in IEEE 754.
So the expression "x >= 0.0f && x <= 1.0f" is true for x = -0.