[apps/proba] Implement Fisher formulae

This commit is contained in:
Léa Saviot
2020-01-10 17:36:06 +01:00
parent 93c96186c4
commit 55a4e3d94c
4 changed files with 78 additions and 4 deletions

View File

@@ -0,0 +1,14 @@
#include <poincare/beta_function.h>
#include <math.h>
#include <cmath>
namespace Poincare {
double BetaFunction(double a, double b) {
if (a < 0.0 || b < 0.0) {
return NAN;
}
return std::exp(std::lgamma(a) + std::lgamma(b) - std::lgamma(a+b));
}
}