зеркало из https://github.com/github/ruby.git
[DOC] Move old ChangeLog files to doc/ChangeLog (#7293)
This commit is contained in:
Родитель
d8facbabff
Коммит
6517d1a188
|
@ -10,7 +10,7 @@ describe "Array#sum" do
|
|||
end
|
||||
|
||||
# https://bugs.ruby-lang.org/issues/12217
|
||||
# https://github.com/ruby/ruby/blob/master/doc/ChangeLog-2.4.0#L6208-L6214
|
||||
# https://github.com/ruby/ruby/blob/master/doc/ChangeLog/ChangeLog-2.4.0#L6208-L6214
|
||||
it "uses Kahan's compensated summation algorithm for precise sum of float numbers" do
|
||||
floats = [2.7800000000000002, 5.0, 2.5, 4.44, 3.89, 3.89, 4.44, 7.78, 5.0, 2.7800000000000002, 5.0, 2.5]
|
||||
naive_sum = floats.reduce { |sum, e| sum + e }
|
||||
|
|
|
@ -40,7 +40,7 @@ describe 'Enumerable#sum' do
|
|||
end
|
||||
|
||||
# https://bugs.ruby-lang.org/issues/12217
|
||||
# https://github.com/ruby/ruby/blob/master/doc/ChangeLog-2.4.0#L6208-L6214
|
||||
# https://github.com/ruby/ruby/blob/master/doc/ChangeLog/ChangeLog-2.4.0#L6208-L6214
|
||||
it "uses Kahan's compensated summation algorithm for precise sum of float numbers" do
|
||||
floats = [2.7800000000000002, 5.0, 2.5, 4.44, 3.89, 3.89, 4.44, 7.78, 5.0, 2.7800000000000002, 5.0, 2.5].to_enum
|
||||
naive_sum = floats.reduce { |sum, e| sum + e }
|
||||
|
|
Загрузка…
Ссылка в новой задаче