I found this and this on this StackExchange as to why Mathematica rounds half to even, which means that
Round[{0.5, 1.5, 2.5, 3.5, 4.5}]
gives
{0, 2, 2, 4, 4}
but now I am interested in rounding half down, which would be a function such that
RoundDown[{7.49, 7.5, 7.51}]
gives
{7, 7, 8}
I don't think it exists since I searched a lot and didn't find anything, so I was wondering as to how would one code such a function efficiently (I need to run it some millions of times)?
roundDown[{7.4999, 7.5, 7.51}]– viiv Jan 03 '18 at 06:481/2instead of0.5. E.g. tryrd1 = Ceiling[# - 1/2] &; rd2 = Ceiling[# - 0.5] &; {rd1[3/2 + 2^-53], rd2[3/2 + 2^-53]}. – Michael E2 Feb 20 '18 at 12:17