diff options
| author | vvvv <[email protected]> | 2025-06-17 23:08:38 +0300 |
|---|---|---|
| committer | vvvv <[email protected]> | 2025-06-18 11:14:06 +0300 |
| commit | 7803a38571cb0dc674b01065f374c116de966b4b (patch) | |
| tree | 1e3e98c1d5205cf9930965e6a5c6a967824165ac /yql/essentials/udfs/common/math/lib/erfinv.cpp | |
| parent | 80d6f567b04024db1404525203859e917f332a26 (diff) | |
YQL-20086 udfs
commit_hash:631fd9ed259a7c95a618e1265f61df28a87ce922
Diffstat (limited to 'yql/essentials/udfs/common/math/lib/erfinv.cpp')
| -rw-r--r-- | yql/essentials/udfs/common/math/lib/erfinv.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yql/essentials/udfs/common/math/lib/erfinv.cpp b/yql/essentials/udfs/common/math/lib/erfinv.cpp index b762ec28070..def902860c3 100644 --- a/yql/essentials/udfs/common/math/lib/erfinv.cpp +++ b/yql/essentials/udfs/common/math/lib/erfinv.cpp @@ -5,7 +5,7 @@ #include "erfinv.h" template <size_t N> -static double polEval(double x, const std::array<double, N>& coef) { +static double PolEval(double x, const std::array<double, N>& coef) { static_assert(N > 0, "Array coef[] should not be empty."); return std::accumulate(coef.crbegin() + 1, coef.crend(), coef[N - 1], [x] (auto init, auto cur) { @@ -97,14 +97,14 @@ double ErfInv(double x) { double ans; if (x <= 0.85) { double r = 0.180625 - 0.25 * x * x; - ans = x * polEval(r, a) / polEval(r, b); + ans = x * PolEval(r, a) / PolEval(r, b); } else { double r = std::sqrt(M_LN2 - log(1. - x)) - 1.6; if (r <= 3.4) { - ans = polEval(r, c) / polEval(r, d); + ans = PolEval(r, c) / PolEval(r, d); } else { r -= 3.4; - ans = polEval(r, e) / polEval(r, f); + ans = PolEval(r, e) / PolEval(r, f); } } |
