Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Array#sum and Enumerable#sum #4309

Merged
merged 4 commits into from
Nov 17, 2016
Merged

fix Array#sum and Enumerable#sum #4309

merged 4 commits into from
Nov 17, 2016

Commits on Nov 16, 2016

  1. add Kahan's compensated algorithm for Floats

    Fixes part of a bug identified in #4297
    phluid61 committed Nov 16, 2016
    Configuration menu
    Copy the full SHA
    be05f1b View commit details
    Browse the repository at this point in the history
  2. make Array#sum use Enumerable's addition logic

    Partially addresses a bug in #4297
    phluid61 committed Nov 16, 2016
    Configuration menu
    Copy the full SHA
    343028a View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2016

  1. change Array#sum to better match MRI

    Fixes most of the tests that weren't perfect in #4297.
    phluid61 committed Nov 17, 2016
    Configuration menu
    Copy the full SHA
    8a78908 View commit details
    Browse the repository at this point in the history
  2. fix Array#sum to handle Fixnum overflow

    This passes the final MRI test, referenced in #4297
    phluid61 committed Nov 17, 2016
    Configuration menu
    Copy the full SHA
    e49d272 View commit details
    Browse the repository at this point in the history