Catalan numbers: Difference between revisions
m
→{{header|Phix}}
(Add Swift) |
|||
Line 2,935:
=={{header|Phix}}==
{{libheader|bigatom}}
<lang Phix>-- returns inf/-nan for n>85, and needs the rounding for n>=14, accurate to n=29
function catalan1(integer n)
return floor(factorial(2*n)/(factorial(n+1)*factorial(n))+0.5)
|