From bbb8308a6dd0b04ea717dc5e6a01322ab5ac6926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Tue, 5 May 2020 15:30:32 +0200 Subject: [PATCH] [poincare/normal_distribution] More values are computed We limited the precision too much before. --- poincare/include/poincare/normal_distribution.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poincare/include/poincare/normal_distribution.h b/poincare/include/poincare/normal_distribution.h index 4806a1467..fe30513f8 100644 --- a/poincare/include/poincare/normal_distribution.h +++ b/poincare/include/poincare/normal_distribution.h @@ -16,11 +16,11 @@ public: * The result of the verification is *result. */ static bool ExpressionMuAndVarAreOK(bool * result, const Expression & mu, const Expression & sigma, Context * context); private: - /* For the standard normal distribution, P(X < y) > 0.9999995 for y >= 4.892 so the + /* For the standard normal distribution, P(X < y) > 0.99999995 for y >= 5.33 so the * value displayed is 1. But this is dependent on the fact that we display * only 7 decimal values! */ static_assert(Preferences::LargeNumberOfSignificantDigits == 7, "k_boundStandardNormalDistribution is ill-defined compared to LargeNumberOfSignificantDigits"); - constexpr static double k_boundStandardNormalDistribution = 4.892; + constexpr static double k_boundStandardNormalDistribution = 5.33; template static T StandardNormalCumulativeDistributiveFunctionAtAbscissa(T abscissa); template static T StandardNormalCumulativeDistributiveInverseForProbability(T probability); };