I was trying to comment on sequence https://oeis.org/A047229 in the OEIS, when one of the editors pointed out that the rounding is done wrong in this Mathematica one-liner:
Table[Round[(3*n - 3)/2], {n, 1, 57}]
In Mathematica I get the following results:
Round[1.5] = 2
Round[4.5] = 4
Round[7.5] = 8
Round[10.5] = 10
In school I was taught that you should round fractions equal to 0.5 up and that the correct answers are:
Round[1.5] = 2
Round[4.5] = 5
Round[7.5] = 8
Round[10.5] = 11
Is this a bug or a feature?
Round
that this is a feature. $\endgroup$round(4.5)
gives5
!Mathematica graphics, while Maxima does it like Mathematica. !Mathematica graphics $\endgroup$