More rounding mode documentation.

This commit is contained in:
Stephen Canon committed 2021-09-26 21:24:30 -04:00
1 parent d78c067765
commit eeaf9e384a
1 file changed
+11
+11
View File
@@ -44,8 +44,19 @@ public enum RoundingRule {
/// and admit _double roundings_ when interoperating with some modes.
case toOdd
/// Produces the representable value that is closest to the value being
/// rounded. If two values are equally close, the one that has greater
/// magnitude is returned.
case toNearestOrAwayFromZero
/// Produces the representable value that is closest to the value being
/// rounded. If two values are equally close, the one whose least
/// significant bit is not set is returned.
case toNearestOrEven
/// Adds a uniform random value from [0, d) to the value being rounded,
/// then returns the floor of the resulting value, where d is the
/// distance between the two closest representable values.
case stochastic
/// If the value being rounded is representable, that value is returned.