diff options
author | Kenta Murata <3959+mrkn@users.noreply.github.com> | 2022-12-26 21:02:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-26 21:02:47 +0900 |
commit | 9f2378959e5c5b5c39c9993f1a84e5304ff113d6 (patch) | |
tree | be3582344869f036ed52b0c0a96e24d7c5655f9d /spec/ruby/core | |
parent | bb60e4615f49a4dbc4f0eb776c8773feabb1a66f (diff) | |
download | ruby-9f2378959e5c5b5c39c9993f1a84e5304ff113d6.tar.gz |
numeric.c: Fix round_half_even for specific values (#7023)
Handle the integert and the float parts separately in round_half_even
to prevent error occursions in floating point calculation.
Diffstat (limited to 'spec/ruby/core')
-rw-r--r-- | spec/ruby/core/float/round_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/core/float/round_spec.rb b/spec/ruby/core/float/round_spec.rb index 50106025f9..e5a8f534e7 100644 --- a/spec/ruby/core/float/round_spec.rb +++ b/spec/ruby/core/float/round_spec.rb @@ -136,7 +136,7 @@ describe "Float#round" do -4.809999999999999.round(5, half: :even).should eql(-4.81) end - ruby_bug "", ""..."3.4" do + ruby_bug "", ""..."3.3" do # These numbers are neighbouring floating point numbers round a # precise value. They test that the rounding modes work correctly # round that value and precision is not lost which might cause |