From eccdd2fb6f6aed19f15f431ce70eb7f299ab5fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Tue, 20 Aug 2019 11:27:38 +0200 Subject: [PATCH] [apps/proba] Fix Student distribution root search bracket --- apps/probability/law/student_law.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/probability/law/student_law.cpp b/apps/probability/law/student_law.cpp index 5e9f31096..fd3d8bafb 100644 --- a/apps/probability/law/student_law.cpp +++ b/apps/probability/law/student_law.cpp @@ -44,7 +44,8 @@ double StudentLaw::cumulativeDistributiveInverseForProbability(double * probabil return 0.0; } const double small = DBL_EPSILON; - const double big = m_parameter1 >= 1 ? 50.0 : 50 / m_parameter1; + const double standardBig = 10000.0; + const double big = m_parameter1 >= 1 ? standardBig : standardBig / m_parameter1; double xmin = *probability < 0.5 ? -big : small; double xmax = *probability < 0.5 ? -small : big; return cumulativeDistributiveInverseForProbabilityUsingBrentRoots(probability, xmin, xmax);