add numerical recipes library
This commit is contained in:
9
lib/nr/ansi/recipes/bico.c
Normal file
9
lib/nr/ansi/recipes/bico.c
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
float bico(int n, int k)
|
||||
{
|
||||
float factln(int n);
|
||||
|
||||
return floor(0.5+exp(factln(n)-factln(k)-factln(n-k)));
|
||||
}
|
||||
Reference in New Issue
Block a user