Y
Hacker News
new
|
ask
|
show
|
jobs
by
jacobolus
2492 days ago
If the number is positive you can substitute floor(x - 0.5) + 1
Or just explicitly check for 0.5 - 1ulp as a special corner case.