Great, thanks Lex. The documentation for round <http://docs.julialang.org/en/release-0.4/manual/mathematical-operations/> is "round x to the nearest integer", which seems to be a mathematical definition that isn't quite equivalent to the IEEE spec. The docs ought to mention rounding to the nearest.
On Wednesday, October 28, 2015 at 12:35:12 PM UTC+11, ele...@gmail.com wrote: > > "round to nearest, ties to even" is the default IEEE floating point > rounding mode > https://en.wikipedia.org/wiki/IEEE_floating_point#Rounding_rules > > Cheers > Lex > > On Wednesday, October 28, 2015 at 11:02:58 AM UTC+10, jock....@gmail.com > wrote: >> >> Hi there, >> >> I'm using Julia 0.4.0. >> >> round(4.5) gives 4.0, i.e. it rounds down. >> round(5.5) gives 6.0, i.e. it rounds up. >> >> Any ideas why this is the case? >> >> Cheers, >> Jock >> >>