The specification of java.lang.Math.round() says * Returns the closest {@code int} to the argument, with ties * rounding up.
It is not clarified what is "ties rounding up". I guess that it should correspond to the direction "roundTiesToAway" of IEEE 754-2008 and to the java.math.RoundingMode.HALF_UP . They round +0.5 -> +1 -0.5 -> -1 The current implementation of java.lang.Math.round() rounds +0.5 -> +1 -0.5 -> 0 "ties rounding up" should match IEEE754 standard and other JDK math class, shouldn't it ? On Fri, Aug 23, 2013 at 10:32 PM, Brian Burkhalter < brian.burkhal...@oracle.com> wrote: > This message follows the RFC > http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-August/019560.htmlposted > on August 2. > > The issue is http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8010430. > > The proposed patch http://cr.openjdk.java.net/~bpb/8010430/ has the > effect of option (A) in the aforementioned RFC. > > Thanks, > > Brian