add numerical recipes library
This commit is contained in:
8
lib/nr/cpp/recipes/bico.cpp
Normal file
8
lib/nr/cpp/recipes/bico.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <cmath>
|
||||
#include "nr.h"
|
||||
using namespace std;
|
||||
|
||||
DP NR::bico(const int n, const int k)
|
||||
{
|
||||
return floor(0.5+exp(factln(n)-factln(k)-factln(n-k)));
|
||||
}
|
||||
Reference in New Issue
Block a user