JCL Help:BinomialCoeff

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns nCr, i.e. Combination of R objects from N.


Pascal

 function BinomialCoeff(N: Cardinal; R: Cardinal): Float;


Parameters

Parameters Description
N: Cardinal N is the total number of possible items from which R items will be selected. N must be greater than or equal to R but cannot exceed the value of the MaxFactorial constant (defined as 1754 if Float is Extended). N must be greater than 0, otherwise 0 is returned.
R: Cardinal R is the number of items taken from N which will be combined in result possible ways. R must be greater than 0 but less than or equal to N or 0 will be returned.


Return Value

The binomial coefficient of R objects from N.


Description

BinomialCoeff returns nCr, i.e. Combination of R objects from N, also known as the binomial coefficient. A Combination is the number of non-order specific ways you can organize R items taken from a pool of N items. For example, [Red, Blue, Green] is the same combination as [Green, Blue, Red].


About

Unit

JclStatistics


Donator

ESB Consultancy


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page