summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-10-24 22:26:03 +0200
committerEike Rathke <erack@redhat.com>2015-10-24 22:26:41 +0200
commit5f7bc190b0f27fc58d26a6342eed9ead69a25808 (patch)
tree559408b33d92cb0b3f9465386c1596dea3a27f24 /sal
parent157420cf07078b036fb11e6950d5bcae032a4bb4 (diff)
test oddness of rtl_math_erf() and rtl_math_erfc()
Change-Id: I12f38d29d1d0b02b8a99977a232646c213ef20e9
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/rtl/math/test-rtl-math.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sal/qa/rtl/math/test-rtl-math.cxx b/sal/qa/rtl/math/test-rtl-math.cxx
index 1d3f07fee9c0..e3dcfec82bb2 100644
--- a/sal/qa/rtl/math/test-rtl-math.cxx
+++ b/sal/qa/rtl/math/test-rtl-math.cxx
@@ -102,6 +102,9 @@ public:
rtl::math::setNan( &x);
res = rtl::math::erf(x);
CPPUNIT_ASSERT_EQUAL(true,rtl::math::isNan(x));
+ x = 3.0;
+ res = rtl::math::erf(-x);
+ CPPUNIT_ASSERT_EQUAL(-rtl::math::erf(x),res);
}
void test_erfc() {
@@ -118,6 +121,9 @@ public:
rtl::math::setNan( &x);
res = rtl::math::erfc(x);
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);
}
void test_expm1() {