Binomial: Difference between revisions

Jump to navigation Jump to search
(Created page with "{{Built-in|Binomial|!}} is a dyadic scalar function which gives the binomial coefficient between the two arguments. The...")
 
No edit summary
Line 1: Line 1:
{{Built-in|Binomial|!}} is a [[dyadic]] [[scalar function]] which gives the [[wikipedia:binomial coefficient|binomial coefficient]] between the two [[argument|arguments]]. The argument order is reversed from that of the mathematical notation; <source lang=apl inline>k!n</source> evaluates to nCk. Binomial shares the [[glyph]] <source lang=apl inline>!</source> with the monadic arithmetic function [[Factorial]].
{{Built-in|Binomial|!}} is a [[dyadic]] [[scalar function]] which gives the [[wikipedia:binomial coefficient|binomial coefficient]] <math>\tbinom nk</math> between the two [[argument|arguments]]. The argument order <source lang=apl inline>k!n</source> is reversed compared to most of traditional mathematical notation's alternative notations, for example <math>C(n,k)</math> and <math>_nC_k</math>, but not others, like <math>C_n^k</math>. Binomial shares the [[glyph]] <source lang=apl inline>!</source> with the monadic arithmetic function [[Factorial]].


== Examples ==
== Examples ==
Line 32: Line 32:
</source>
</source>


In multiple implementations where [[Factorial]] is extended to use the [[wikipedia:Gamma function|Gamma function]], Binomial is defined to use the above equality for non-integers. In that case, the [[wikipedia:Beta function|Beta function]] becomes closely related to the Binomial, giving the identity <source lang=apl inline>Beta(X,Y) ←→ ÷Y×(X-1)!X+Y-1</source>.
In multiple implementations where [[Factorial]] is extended to use the [[wikipedia:Gamma function|Gamma function]] <math>\Gamma(n)</math>, Binomial is defined to use the above equality for non-integers. In that case, the [[wikipedia:Beta function|Beta function]] <math>\Beta(x,y)</math> becomes closely related to the Binomial, giving the identity <math>\Beta(X,Y)</math>{{←→}}<source lang=apl inline>÷Y×(X-1)!X+Y-1</source>.


<source lang=apl>
<source lang=apl>