array.c, enum.c: change sum algorithm
array.c (rb_ary_sum): change the algorithm to Kahan-Babuska balancing summation to be more precise. [Feature #12871] [ruby-core:77771]
enum.c (sum_iter, enum_sum): ditto.
test_array.rb, test_enum.rb: add an assertion for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
array.c, enum.c: change sum algorithm
array.c (rb_ary_sum): change the algorithm to Kahan-Babuska balancing
summation to be more precise.
[Feature #12871] [ruby-core:77771]
enum.c (sum_iter, enum_sum): ditto.
test_array.rb, test_enum.rb: add an assertion for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e