Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nine_k
on March 2, 2017
|
parent
|
context
|
favorite
| on:
How many floating-point numbers are in the interva...
-0 is "below zero, but for so little that we cannot represent", so it's outside [0, 1].
kr7
on March 2, 2017
[–]
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.
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: