PetscDTBinomialInt#

Compute the binomial coefficient n choose k Not Collective

Input Parameters#

  • n - a non-negative integer

  • k - an integer between 0 and n, inclusive

Output Parameter#

  • binomial - the binomial coefficient n choose k

Note#

This is limited by integers that can be represented by PetscInt.

Use PetscDTBinomial() for real number approximations of larger values

See Also#

PetscDTFactorial(), PetscDTFactorialInt(), PetscDTBinomial(), PetscDTEnumPerm()

Level#

beginner

Location#

include/petscdt.h

Examples#

src/dm/dt/dualspace/impls/lagrange/tests/ex1.c
src/dm/dt/space/impls/ptrimmed/tests/ex1.c
src/dm/dt/tests/ex13.c
src/dm/dt/tests/ex15.c
src/dm/dt/tests/ex7.c
src/dm/dt/tests/ex8.c
src/dm/dt/tests/ex9.c


Index of all DT routines
Table of Contents for all manual pages
Index of all manual pages