summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/numerics
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/numerics')
-rw-r--r--libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp9
-rw-r--r--libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp9
2 files changed, 18 insertions, 0 deletions
diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp
index deb056d67de..5258bdc3a0f 100644
--- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp
+++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp
@@ -54,6 +54,15 @@ void test_edges()
assert(r.imag() == 0);
assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
+ else if (testcases[i].real() == -1 && testcases[i].imag() == 0)
+ {
+ assert(r.real() == 0);
+ assert(!std::signbit(r.real()));
+ if (std::signbit(testcases[i].imag()))
+ is_about(r.imag(), -pi);
+ else
+ is_about(r.imag(), pi);
+ }
else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
diff --git a/libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp
index 3da56c32f19..cb9188d935a 100644
--- a/libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp
+++ b/libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp
@@ -44,6 +44,15 @@ void test_edges()
assert(std::signbit(r.real()) == std::signbit(testcases[i].real()));
assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
+ else if (testcases[i].real() == 0 && std::abs(testcases[i].imag()) == 1)
+ {
+ assert(r.real() == 0);
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
+ if (std::signbit(testcases[i].imag()))
+ is_about(r.imag(), -pi/2);
+ else
+ is_about(r.imag(), pi/2);
+ }
else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
OpenPOWER on IntegriCloud