Category : C Source Code
Archive   : RECIPEX.ZIP
Filename : FACTRL.C
float factrl(n)
int n;
{
static int ntop=4;
static float a[33]={1.0,1.0,2.0,6.0,24.0};
int j;
float gammln();
void nrerror();
if (n < 0) nrerror("Negative factorial in routine FACTRL");
if (n > 32) return exp(gammln(n+1.0));
while (ntop
a[ntop]=a[j]*ntop;
}
return a[n];
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/