Scippy

SCIP

Solving Constraint Integer Programs

Additional math functions

Detailed Description

Functions

SCIP_Longint SCIPcalcBinomCoef (int n, int m)
 

Function Documentation

SCIP_Longint SCIPcalcBinomCoef ( int  n,
int  m 
)

calculates a binomial coefficient n over m, choose m elements out of n, maximal value will be 33 over 16 (because the n=33 is the last line in the Pascal's triangle where each entry fits in a 4 byte value), an error occurs due to big numbers or an negative value m (and m < n) and -1 will be returned

Parameters
nnumber of different elements
mnumber to choose out of the above

Definition at line 7249 of file misc.c.

References SCIP_Longint, SCIP_LONGINT_MAX, and SCIP_Real.