Glen Whitney 2dbf32548f
fix(combinations): Extend range of exact values (#2414)
Prior to this change, combinations(42,21) did not return an integer,
  despite its value being well below MAX_SAFE_INTEGER. Now the
  multiplications and divisions are balanced to try to keep the
  intermediate results within the safe range.

  Adds a couple of tests for larger values of combinations().

  Resolves #2413.

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2022-02-16 12:37:09 +01:00
..