Free cookie consent management tool by TermsFeed Policy Generator

Opened 7 years ago

Closed 7 years ago

#2746 closed defect (done)

Overflow issues in binomial coefficient calculation

Reported by: bburlacu Owned by: mkommend
Priority: medium Milestone: HeuristicLab 3.3.15
Component: Common Version: 3.3.14
Keywords: Cc:

Description

The EnumerableExtensions.BinomialCoefficient(n,k) method may silently overflow (for large n and k) returning the wrong results. This method should fail with an exception if the result is outside the long range.

Change History (7)

comment:1 Changed 7 years ago by bburlacu

  • Status changed from new to accepted

comment:2 Changed 7 years ago by bburlacu

  • Owner changed from bburlacu to mkommend
  • Status changed from accepted to reviewing

comment:3 Changed 7 years ago by bburlacu

r14750: Enable explicit overflow checking in binomial coefficient calculation.

comment:4 Changed 7 years ago by mkommend

  • Status changed from reviewing to readytorelease

comment:5 Changed 7 years ago by mkommend

  • Owner changed from mkommend to bburlacu
  • Status changed from readytorelease to reviewing

r14769: Made combinations extension methods thread-safe by avoiding lazy evaluation linq queries.

comment:6 Changed 7 years ago by bburlacu

  • Owner changed from bburlacu to mkommend
  • Status changed from reviewing to readytorelease

The code looks fine to me and I couldn't find any problems.

comment:7 Changed 7 years ago by mkommend

  • Resolution set to done
  • Status changed from readytorelease to closed

r14850: Merged r14750, r14769 into stable.

Note: See TracTickets for help on using tickets.