Commit Graph

9 Commits

Author SHA1 Message Date
Marshall Clow
0662d025d5 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
2019-06-18 21:20:02 +00:00
Marshall Clow
389b4e6d63 Fix the floating point version of midpoint. It wasn't constexpr, among other things. Add more tests. As a drive-by, the LCD implementation had a class named '__abs' which did a 'absolute value to a common-type' conversion. Rename that to be '__ct_abs'.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@363714 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-18 18:13:54 +00:00
Marshall Clow
58320bef19 Add additional constraints on midpoint(pointer, pointer). Fixes PR#42037.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@361970 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-29 15:17:55 +00:00
Michal Gorny
549cc3d6e1 [libc++] [test] Use std::nextafter() instead of std::nexttoward()
Use std::nextafter() instead of std::nexttoward() in midpoint tests.
In the context of this test, this should not cause any difference.
Since nexttowardl() is not implemented on NetBSD 8, the latter function
combined with 'long double' type caused test failure.  nextafterl() does
not have this problem.

Differential Revision: https://reviews.llvm.org/D61748

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@360673 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-14 13:56:20 +00:00
Marshall Clow
321a1f890d Implement midpoint for floating point types. Reviewed as https://reviews.llvm.org/D61014.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@359184 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-25 12:11:43 +00:00
Billy Robert O'Neal III
80e36e12fd [libc++] [test] Add missing required headers to midpoint.integer.pass.cpp
This change authored by Paolo Torres <t-pator@microsoft.com>

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@358698 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-18 18:02:14 +00:00
Marshall Clow
3f377ef16a Reorg the midpoint pointer test into runtime and constexpr tests; comment out the volatile constexpr tests for GCC because our experimental gcc bot barfs on them.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@356177 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-14 17:43:41 +00:00
Marshall Clow
3166f3aa00 Fix two of the three bot failures for midpoint; the ones regarding the lack of '__int128_t'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@356169 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-14 17:20:02 +00:00
Marshall Clow
5310aa3850 Add std::midpoint for integral and poiner types. Described in P0811, reviewed as D59099.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@356162 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-14 16:25:55 +00:00