Factorial: Difference between revisions

Jump to navigation Jump to search
313 bytes added ,  19:07, 3 June 2020
no edit summary
(Created page with "{{Built-in|Factorial|!}} is a monadic scalar function which gives the factorial of a non-negative integer. Factorial shares the glyph <sour...")
 
No edit summary
Line 1: Line 1:
{{Built-in|Factorial|!}} is a [[monadic]] [[scalar function]] which gives the [[wikipedia:factorial|factorial]] of a non-negative integer. Factorial shares the [[glyph]] <source lang=apl inline>!</source> with the dyadic arithmetic function [[Binomial]].
{{Built-in|Factorial|!}} is a [[monadic]] [[scalar function]] which gives the [[wikipedia:factorial|factorial]] of a non-negative integer. Factorial takes its [[glyph]] <source lang=apl inline>!</source> from [[Comparison_with_traditional_mathematics#Prefix|traditional mathematics]] but, like all [[monadic function]]s, takes its argument on the right  <source lang=apl inline>!Y</source> instead of traditional mathematics' <math>Y!</math>. It shares the glyph with the dyadic arithmetic function [[Binomial]].


== Examples ==
== Examples ==
Line 14: Line 14:
== Extended definition ==
== Extended definition ==


In multiple implementations, this function has an extended definition using the [[wikipedia:Gamma function|Gamma function]] Gamma(n), so that it is defined for real and [[complex]] numbers. Because Gamma(n) equals (n-1)!, <source lang=apl inline>!Y</source> is defined as Gamma(Y+1).
In multiple implementations, this function has an extended definition using the [[wikipedia:Gamma function|Gamma function]] <math>\Gamma(n)</math>, so that it is defined for real and [[complex]] numbers. Because <math>\Gamma(n)</math> equals <math>(n-1)!</math>, <source lang=apl inline>!Y</source> is defined as <math>\Gamma(Y+1)</math>.


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

Navigation menu