I have a question about std::round with signature: double round (double x);
Let's say I have this code:
int i = std::round(0.9);
In this case, std::round should return 1.00000000000, but that's uncomfortably close to 0.9999999999999 and I'm concerned that floating-point errors will end up rounding this down.
I would hope that i == 1, but is this guaranteed?