For 128 bit long double implemented as 2 doubles on PowerPC, nextafterl() of libm gives imprecise results which fails the test that checks the midpoint of adjacent values. This patch skips the test for this particular case on PowerPC.
Details
Diff Detail
- Repository
- rCXX libc++
Event Timeline
I'd like to understand what's going on with nextafter when you say "is unreliable". Is there a link describing this behavior?
libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp | ||
---|---|---|
91 | This is all compile-time stuff; we shouldn't be doing a runtime check. | |
114 | We don't usually write outputs in tests; no one looks at them. |
In svn 360673 we changed this call from "nextoward` to nextafter because NetBSD 8 doesn't implement the former.
Addressed comments:
- Skip the test of midpoint of adjacent values for PPC double-double based on compile-time checking;
- Use #if defined(__PPC__) instead of #if __PPC__ ;
- Removed output to std::cerr.
I was updating this test this morning to add constexpr tests, so I just committed this as revision 363740.
I believe that all comments have been addressed. LGTM.
libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp | ||
---|---|---|
84 | Just a note: It appears AIX does not provide nextafterl for such long doubles anyway. |
Just a note: It appears AIX does not provide nextafterl for such long doubles anyway.