diff --git a/src/java.base/share/classes/java/math/RoundingMode.java b/src/java.base/share/classes/java/math/RoundingMode.java index b4c37f66ed8..de7c33e5392 100644 --- a/src/java.base/share/classes/java/math/RoundingMode.java +++ b/src/java.base/share/classes/java/math/RoundingMode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -87,6 +87,13 @@ package java.math; * ({@link BigDecimal#ROUND_UP}, {@link BigDecimal#ROUND_DOWN}, * etc. ). * + * @apiNote + * Five of the rounding modes declared in this class correspond to + * rounding direction attributes defined in the IEEE Standard + * for Floating-Point Arithmetic, IEEE 754-2019. Where present, + * this correspondence will be noted in the documentation of the + * particular constant. + * * @see BigDecimal * @see MathContext * @author Josh Bloch @@ -130,6 +137,8 @@ public enum RoundingMode { * Rounding mode to round towards zero. Never increments the digit * prior to a discarded fraction (i.e., truncates). Note that this * rounding mode never increases the magnitude of the calculated value. + * This mode corresponds to the IEEE 754-2019 rounding + * attribute roundTowardZero. * *
Example: *