|
109 | 109 | -5.55.round(1, half: :even).should eql(-5.6)
|
110 | 110 | end
|
111 | 111 |
|
112 |
| - it "does not lose precision during the rounding process" do |
113 |
| - 767573.1875850001.round(5, half: nil).should eql(767573.18759) |
114 |
| - 767573.1875850001.round(5, half: :up).should eql(767573.18759) |
115 |
| - 767573.1875850001.round(5, half: :down).should eql(767573.18759) |
116 |
| - 767573.1875850001.round(5, half: :even).should eql(767573.18759) |
117 |
| - -767573.1875850001.round(5, half: nil).should eql(-767573.18759) |
118 |
| - -767573.1875850001.round(5, half: :up).should eql(-767573.18759) |
119 |
| - -767573.1875850001.round(5, half: :down).should eql(-767573.18759) |
120 |
| - -767573.1875850001.round(5, half: :even).should eql(-767573.18759) |
121 |
| - 767573.1875849998.round(5, half: nil).should eql(767573.18758) |
122 |
| - 767573.1875849998.round(5, half: :up).should eql(767573.18758) |
123 |
| - 767573.1875849998.round(5, half: :down).should eql(767573.18758) |
124 |
| - 767573.1875849998.round(5, half: :even).should eql(767573.18758) |
125 |
| - -767573.1875849998.round(5, half: nil).should eql(-767573.18758) |
126 |
| - -767573.1875849998.round(5, half: :up).should eql(-767573.18758) |
127 |
| - -767573.1875849998.round(5, half: :down).should eql(-767573.18758) |
128 |
| - -767573.1875849998.round(5, half: :even).should eql(-767573.18758) |
| 112 | + ruby_bug "", ""..."3.2" do |
| 113 | + it "does not lose precision during the rounding process" do |
| 114 | + 767573.1875850001.round(5, half: nil).should eql(767573.18759) |
| 115 | + 767573.1875850001.round(5, half: :up).should eql(767573.18759) |
| 116 | + 767573.1875850001.round(5, half: :down).should eql(767573.18759) |
| 117 | + 767573.1875850001.round(5, half: :even).should eql(767573.18759) |
| 118 | + -767573.1875850001.round(5, half: nil).should eql(-767573.18759) |
| 119 | + -767573.1875850001.round(5, half: :up).should eql(-767573.18759) |
| 120 | + -767573.1875850001.round(5, half: :down).should eql(-767573.18759) |
| 121 | + -767573.1875850001.round(5, half: :even).should eql(-767573.18759) |
| 122 | + 767573.1875849998.round(5, half: nil).should eql(767573.18758) |
| 123 | + 767573.1875849998.round(5, half: :up).should eql(767573.18758) |
| 124 | + 767573.1875849998.round(5, half: :down).should eql(767573.18758) |
| 125 | + 767573.1875849998.round(5, half: :even).should eql(767573.18758) |
| 126 | + -767573.1875849998.round(5, half: nil).should eql(-767573.18758) |
| 127 | + -767573.1875849998.round(5, half: :up).should eql(-767573.18758) |
| 128 | + -767573.1875849998.round(5, half: :down).should eql(-767573.18758) |
| 129 | + -767573.1875849998.round(5, half: :even).should eql(-767573.18758) |
| 130 | + end |
129 | 131 | end
|
130 | 132 |
|
131 | 133 | it "raises FloatDomainError for exceptional values with a half option" do
|
|
0 commit comments