[libcxx-commits] [libcxx] [libc++] Adjust some of the [rand.dist] critical values that are too strict (PR #88669)
Matt Stephanson via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 15 14:34:45 PDT 2024
================
@@ -70,8 +70,8 @@ test1()
3*std::exp(2*sqr(d.s())) - 6;
assert(std::abs((mean - x_mean) / x_mean) < 0.01);
assert(std::abs((var - x_var) / x_var) < 0.01);
- assert(std::abs((skew - x_skew) / x_skew) < 0.05);
- assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 0.25);
+ assert(std::abs((skew - x_skew) / x_skew) < 0.1);
+ assert(std::abs((kurtosis - x_kurtosis) / x_kurtosis) < 1.9);
----------------
MattStephanson wrote:
The expected kurtosis is 0.0039, so I think that explains the loose relative tolerance.
These variates aren't normal, but just as a rough landmark, if they were, the standard deviation of the sample kurtosis would be 0.00490, so I don't think a 190% tolerance is unreasonable.
https://github.com/llvm/llvm-project/pull/88669
More information about the libcxx-commits
mailing list