Disable the 'nextafter' portions of these tests on PPC when using 128-bit doubles because the 'nextafter' call doesn't work right. Reviewed as https://reviews.llvm.org/D62384. Thanks to Xing Xue for the patch, and Hubert for the explanation.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@363740 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp b/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
index 7d98348..aeb9a19 100644
--- a/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
+++ b/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
@@ -92,25 +92,33 @@
     assert(d0 < d1);  // sanity checking
     assert(d1 < d2);  // sanity checking
 
-//  Since there's nothing in between, the midpoint has to be one or the other
-    T res;
-    res = std::midpoint(d0, d1);
-    assert(res == d0 || res == d1);
-    assert(d0 <= res);
-    assert(res <= d1);
-    res = std::midpoint(d1, d0);
-    assert(res == d0 || res == d1);
-    assert(d0 <= res);
-    assert(res <= d1);
+#if defined(__PPC__) && __LONG_DOUBLE_128__ && !__LONG_DOUBLE_IEEE128__
+//	For 128 bit long double implemented as 2 doubles on PowerPC,
+//	nextafterl() of libm gives imprecise results which fails the
+//	midpoint() tests below. So skip the test for this case.
+    if constexpr (sizeof(T) != 16)
+#endif
+    {
+	//  Since there's nothing in between, the midpoint has to be one or the other
+		T res;
+		res = std::midpoint(d0, d1);
+		assert(res == d0 || res == d1);
+		assert(d0 <= res);
+		assert(res <= d1);
+		res = std::midpoint(d1, d0);
+		assert(res == d0 || res == d1);
+		assert(d0 <= res);
+		assert(res <= d1);
 
-    res = std::midpoint(d1, d2);
-    assert(res == d1 || res == d2);
-    assert(d1 <= res);
-    assert(res <= d2);
-    res = std::midpoint(d2, d1);
-    assert(res == d1 || res == d2);
-    assert(d1 <= res);
-    assert(res <= d2);
+		res = std::midpoint(d1, d2);
+		assert(res == d1 || res == d2);
+		assert(d1 <= res);
+		assert(res <= d2);
+		res = std::midpoint(d2, d1);
+		assert(res == d1 || res == d2);
+		assert(d1 <= res);
+		assert(res <= d2);
+    }
 }