CuInterval makes use of the built-in CUDA math functions which use round-to-nearest-even.
Since some math functions are not fully accurate up to machine presicion — they do not conform to IEEE754 — we have to perform additional outward rounding to cover the worst-cases of the specified maximum ulp-error of an intrinsic function.
The CUDA math functions use round-to-nearest-even and thus pick the even floating point number if the number would land exactly between two floating point values, otherwise it picks the nearest available value between two floating point values.
If the intrinsic function has a reported max. error of 1 ulp, then the resulting interval output will have a max. error of 2.5 ulps. To see why, let’s look at all the scenarios that could be possible:
We denote the absolute error from the true floating point value by Δulp. A Δulp of 0.5 indicates that the value is 0.5 ulps away from the correct floating point value because it is not representable as, e.g., a 64 bit floating point number.
So,
∣inf(Fanalytic(X))−inf(F(X))∣≤2.5 ulps
is what we guarantee in this case.