diff options
author | Andrey Khalyavin <halyavin@gmail.com> | 2022-02-10 16:46:29 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:29 +0300 |
commit | f773626848a7c7456803654292e716b83d69cc12 (patch) | |
tree | db052dfcf9134f492bdbb962cb6c16cea58e1ed3 /util/generic/ymath_ut.cpp | |
parent | f43ab775d197d300eb67bd4497632b909cd7c2a5 (diff) | |
download | ydb-f773626848a7c7456803654292e716b83d69cc12.tar.gz |
Restoring authorship annotation for Andrey Khalyavin <halyavin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/generic/ymath_ut.cpp')
-rw-r--r-- | util/generic/ymath_ut.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/generic/ymath_ut.cpp b/util/generic/ymath_ut.cpp index 29190b55eb..218801d1e6 100644 --- a/util/generic/ymath_ut.cpp +++ b/util/generic/ymath_ut.cpp @@ -32,7 +32,7 @@ class TMathTest: public TTestBase { UNIT_TEST(TestLogGamma); UNIT_TEST(TestIsValidFloat); UNIT_TEST(TestAbs); - UNIT_TEST(TestPower); + UNIT_TEST(TestPower); UNIT_TEST(TestSigmoid); UNIT_TEST(TestCeilDiv); UNIT_TEST_SUITE_END(); @@ -43,7 +43,7 @@ private: void TestErf(); void TestLogGamma(); void TestAbs(); - void TestPower(); + void TestPower(); void TestSigmoid(); void TestCeilDiv(); @@ -172,15 +172,15 @@ void TMathTest::TestAbs() { UNIT_ASSERT_VALUES_EQUAL(Abs(-1.0), 1.0); UNIT_ASSERT_VALUES_EQUAL(Abs(0.0), 0.0); } - -void TMathTest::TestPower() { - UNIT_ASSERT_VALUES_EQUAL(Power(0, 0), 1); - UNIT_ASSERT_VALUES_EQUAL(Power(-1, 1), -1); - UNIT_ASSERT_VALUES_EQUAL(Power(-1, 2), 1); - UNIT_ASSERT_VALUES_EQUAL(Power(2LL, 32), 1LL << 32); - UNIT_ASSERT_DOUBLES_EQUAL(Power(0.0, 0), 1.0, 1e-9); - UNIT_ASSERT_DOUBLES_EQUAL(Power(0.1, 3), 1e-3, 1e-9); -} + +void TMathTest::TestPower() { + UNIT_ASSERT_VALUES_EQUAL(Power(0, 0), 1); + UNIT_ASSERT_VALUES_EQUAL(Power(-1, 1), -1); + UNIT_ASSERT_VALUES_EQUAL(Power(-1, 2), 1); + UNIT_ASSERT_VALUES_EQUAL(Power(2LL, 32), 1LL << 32); + UNIT_ASSERT_DOUBLES_EQUAL(Power(0.0, 0), 1.0, 1e-9); + UNIT_ASSERT_DOUBLES_EQUAL(Power(0.1, 3), 1e-3, 1e-9); +} void TMathTest::TestSigmoid() { UNIT_ASSERT_EQUAL(Sigmoid(0.f), 0.5f); |