diff options
author | aosipenko <aosipenko@yandex-team.ru> | 2022-02-10 16:48:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:08 +0300 |
commit | 69e3c43df1c96bc2ac8946bf4dfb1f5fc438ff7f (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /util/generic/ymath_ut.cpp | |
parent | 948fd24d47d4b3b7815aaef1686aea00ef3f4288 (diff) | |
download | ydb-69e3c43df1c96bc2ac8946bf4dfb1f5fc438ff7f.tar.gz |
Restoring authorship annotation for <aosipenko@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/ymath_ut.cpp')
-rw-r--r-- | util/generic/ymath_ut.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/util/generic/ymath_ut.cpp b/util/generic/ymath_ut.cpp index 8861c05dcd0..29190b55eb4 100644 --- a/util/generic/ymath_ut.cpp +++ b/util/generic/ymath_ut.cpp @@ -123,32 +123,32 @@ void TMathTest::TestClp2() { } } } - -void TMathTest::TestErf() { - static const double a = -5.0; + +void TMathTest::TestErf() { + static const double a = -5.0; static const double b = 5.0; - static const int n = 50; - static const double step = (b - a) / n; - - static const double values[n + 1] = { - -1.0000000, -1.0000000, -1.0000000, -1.0000000, -1.0000000, - -1.0000000, -0.9999999, -0.9999996, -0.9999985, -0.9999940, - -0.9999779, -0.9999250, -0.9997640, -0.9993115, -0.9981372, - -0.9953223, -0.9890905, -0.9763484, -0.9522851, -0.9103140, - -0.8427008, -0.7421010, -0.6038561, -0.4283924, -0.2227026, + static const int n = 50; + static const double step = (b - a) / n; + + static const double values[n + 1] = { + -1.0000000, -1.0000000, -1.0000000, -1.0000000, -1.0000000, + -1.0000000, -0.9999999, -0.9999996, -0.9999985, -0.9999940, + -0.9999779, -0.9999250, -0.9997640, -0.9993115, -0.9981372, + -0.9953223, -0.9890905, -0.9763484, -0.9522851, -0.9103140, + -0.8427008, -0.7421010, -0.6038561, -0.4283924, -0.2227026, 0.0000000, 0.2227026, 0.4283924, 0.6038561, 0.7421010, 0.8427008, 0.9103140, 0.9522851, 0.9763484, 0.9890905, 0.9953223, 0.9981372, 0.9993115, 0.9997640, 0.9999250, 0.9999779, 0.9999940, 0.9999985, 0.9999996, 0.9999999, 1.0000000, 1.0000000, 1.0000000, 1.0000000, 1.0000000, 1.0000000}; - - double x = a; - for (int i = 0; i <= n; ++i, x += step) { - double f = Erf(x); - UNIT_ASSERT_DOUBLES_EQUAL(f, values[i], 1e-7); - } -} + + double x = a; + for (int i = 0; i <= n; ++i, x += step) { + double f = Erf(x); + UNIT_ASSERT_DOUBLES_EQUAL(f, values[i], 1e-7); + } +} void TMathTest::TestLogGamma() { double curVal = 0.0; |