http://reference.wolfram.com/language/ref/Round.html
Round[x]
gives the integer closest to x.http://reference.wolfram.com/language/ref/Round.html
Round[x]
gives the integer closest to x.from examples further down: Round[{0.5, 1.5, 2.5, 3.5, 4.5}] yields 0, 2, 2, 4, 4
What I expect is, Mathematica doesn't make promises about stuff that can be affected by an infinitesimal change, with a floating point input. I don't think you can talk about "numbers of the form x.5" precisely with floating point. Mathematica typically behaves differently with inputs 1/2 and 0.5, so I'm not sure what's going here. I guess Round[] works slightly differently, maybe tries to fractionalize the input first.
I checked, and that promise is still there actually, under Details section.
Yes there are. 1 and 2 are equidistant from 1.5.
> I don't think you can talk about "numbers of the form x.5" precisely with floating point.
Yes you can.
Here's a quick exercise for you:
#include <stdio.h>
int main() { float x = 123456789.5; printf("%f\n", x); return 0; }
prints 123456792.000000
And the distance between two nearest floats grow larger as you go away from 0. So the nearest existing integers aren't 123456790 or 123456788 either.
Yeah, yeah, go and live with your delusions happily ever, "pal". Shoo.