Kaydet (Commit) 70a50e83 authored tarafından Eike Rathke's avatar Eike Rathke

add delta for double comparison

Change-Id: I008438a6b1651068165e6a07b16ea0b2e447074f
üst 5f7bc190
......@@ -104,7 +104,7 @@ public:
CPPUNIT_ASSERT_EQUAL(true,rtl::math::isNan(x));
x = 3.0;
res = rtl::math::erf(-x);
CPPUNIT_ASSERT_EQUAL(-rtl::math::erf(x),res);
CPPUNIT_ASSERT_DOUBLES_EQUAL( -rtl::math::erf(x), res, 1E-12);
}
void test_erfc() {
......@@ -123,7 +123,7 @@ public:
CPPUNIT_ASSERT_EQUAL(true,rtl::math::isNan(x));
x = 3.0;
res = rtl::math::erfc(-x);
CPPUNIT_ASSERT_EQUAL(2.0-rtl::math::erfc(x),res);
CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 - rtl::math::erfc(x), res, 1E-12);
}
void test_expm1() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment