Strange round() results?

So the docs for round say

The RoundingMode r controls the direction of the rounding; the default is RoundNearest, which rounds to the nearest integer, with ties (fractional values of 0.5) being rounded to the nearest even integer

And it has your exact example as an example

 Examples
 ≡≡≡≡≡≡≡≡≡≡

  julia> round(1.7)
  2.0

  julia> round(Int, 1.7)
  2

  julia> round(1.5)
  2.0

  julia> round(2.5)
  2.0

See Rounding - Wikipedia

This is the default rounding mode used in IEEE 754 floating-point operations

4 Likes