aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/ymath.cpp
diff options
context:
space:
mode:
authorjacob <jacob@yandex-team.ru>2022-02-10 16:49:53 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:53 +0300
commit085a76cb8fd1fd01e9483d056938f022970cb4f0 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/ymath.cpp
parent1bf57447b8a115cd60bb6f8509b9b148e1b6debd (diff)
downloadydb-085a76cb8fd1fd01e9483d056938f022970cb4f0.tar.gz
Restoring authorship annotation for <jacob@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/ymath.cpp')
-rw-r--r--util/generic/ymath.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/generic/ymath.cpp b/util/generic/ymath.cpp
index 18a9f61a23..31270728f4 100644
--- a/util/generic/ymath.cpp
+++ b/util/generic/ymath.cpp
@@ -27,7 +27,7 @@ double Erf(double x) {
}
#endif // _MSC_VER
-
+
double LogGammaImpl(double x) {
static constexpr double lnSqrt2Pi = 0.91893853320467274178; // log(sqrt(2.0 * PI))
static constexpr double coeff9 = 1.0 / 1188.0;
@@ -35,7 +35,7 @@ double LogGammaImpl(double x) {
static constexpr double coeff5 = 1.0 / 1260.0;
static constexpr double coeff3 = -1.0 / 360.0;
static constexpr double coeff1 = 1.0 / 12.0;
-
+
if ((x == 1.0) || (x == 2.0)) {
return 0.0; // 0! = 1
}
@@ -53,4 +53,4 @@ double LogGammaImpl(double x) {
res /= x;
res += x * lnX - x + lnSqrt2Pi - 0.5 * lnX;
return res + bonus;
-}
+}