diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-05 09:49:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-05 09:49:39 +0000 |
commit | dfe91fcd08e7e255b5cb1b306e53bea1ddb54e5f (patch) | |
tree | d209f0b546e45cb8d8fa7fc2bbbb5044e53e2c8f /NEWS | |
parent | 76977611dd68e384fdce8c546efda5e1931e67a6 (diff) |
numeric.c: round to nearest even
* numeric.c (flo_round, int_round): support round-to-nearest-even
semantics of IEEE 754 to match sprintf behavior, and add `half:`
optional keyword argument for the old behavior.
[ruby-core:76273] [Bug #12548]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -69,6 +69,9 @@ with all sufficient information, see the ChangeLog file or Redmine * Float#ceil, Float#floor, and Float#truncate now take an optional digits, as well as Float#round. [Feature #12245] + * Float#round now takes an optional keyword argument, half option, and + the default behavior is round-to-nearest-even now. [Bug #12548] + * Hash * Hash#transform_values and Hash#transform_values! [Feature #12512] @@ -83,6 +86,9 @@ with all sufficient information, see the ChangeLog file or Redmine * Integer#digits for extracting columns of place-value notation [Feature #12447] + * Int#round now takes an optional keyword argument, half option, and the + default behavior is round-to-nearest-even now. [Bug #12548] + * IO * IO#gets, IO#readline, IO#each_line, IO#readlines, IO#foreach now takes @@ -112,6 +118,11 @@ with all sufficient information, see the ChangeLog file or Redmine * Support CLOCK_MONOTONIC_RAW_APPROX, CLOCK_UPTIME_RAW, and CLOCK_UPTIME_RAW_APPROX which are introduced by macOS 10.12. +* Rational + + * Rational#round now takes an optional keyword argument, half option, and + the default behavior is round-to-nearest-even now. [Bug #12548] + * Regexp * Regexp#match? [Feature #8110] |