From 6bc317df32bca3c2f942378bd11d37bcf0a7796f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Mon, 19 Aug 2019 15:58:15 +0200 Subject: [PATCH] [app/proba] Comment about computation error --- apps/probability/law/student_law.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/probability/law/student_law.cpp b/apps/probability/law/student_law.cpp index 8f2fca64c..5e9f31096 100644 --- a/apps/probability/law/student_law.cpp +++ b/apps/probability/law/student_law.cpp @@ -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);