[app/proba] Comment about computation error

This commit is contained in:
Léa Saviot
2019-08-19 15:58:15 +02:00
parent 7ec6bea991
commit 6bc317df32

View File

@@ -30,6 +30,9 @@ double StudentLaw::cumulativeDistributiveFunctionAtAbscissa(double x) const {
if (x == 0) {
return 0.5;
}
/* TODO There are some computation errors, where the probability falsly jumps to 1.
* k = 0.001 and P(x < 42000000) (for 41000000 it is around 0.5)
* k = 0.01 and P(x < 8400000) (for 41000000 it is around 0.6) */
const float k = m_parameter1;
const double sqrtXSquaredPlusK = std::sqrt(x*x + k);
double t = (x + sqrtXSquaredPlusK) / (2.0 * sqrtXSquaredPlusK);