5 ms·
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.
by jacobolus 7y 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.