]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/test/compile_test/cstdfloat_cmath_incl_test.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / math / test / compile_test / cstdfloat_cmath_incl_test.cpp
1 // Copyright Matt Borland 2021.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 //
6 // Basic sanity check that header
7 // #includes all the files that it needs to.
8 //
9 #include <boost/math/cstdfloat/cstdfloat_cmath.hpp>
10 //
11 // Note this header includes no other headers, this is
12 // important if this test is to be meaningful:
13 //
14 #include "test_compile_result.hpp"
15
16 void compile_and_link_test()
17 {
18 #ifdef BOOST_FLOAT128_C
19 boost::float128_t f128 = 0;
20
21 check_result<boost::float128_t>(std::ldexp(f128, 0));
22 check_result<boost::float128_t>(std::frexp(f128, 0));
23 check_result<boost::float128_t>(std::fabs(f128));
24 check_result<boost::float128_t>(std::abs(f128));
25 check_result<boost::float128_t>(std::floor(f128));
26 check_result<boost::float128_t>(std::ceil(f128));
27 check_result<boost::float128_t>(std::sqrt(f128));
28 check_result<boost::float128_t>(std::trunc(f128));
29 check_result<boost::float128_t>(std::exp(f128));
30 check_result<boost::float128_t>(std::expm1(f128));
31 check_result<boost::float128_t>(std::pow(f128, 0));
32 check_result<boost::float128_t>(std::log(f128));
33 check_result<boost::float128_t>(std::log10(f128));
34 check_result<boost::float128_t>(std::sin(f128));
35 check_result<boost::float128_t>(std::cos(f128));
36 check_result<boost::float128_t>(std::tan(f128));
37 check_result<boost::float128_t>(std::asin(f128));
38 check_result<boost::float128_t>(std::acos(f128));
39 check_result<boost::float128_t>(std::atan(f128));
40 check_result<boost::float128_t>(std::sinh(f128));
41 check_result<boost::float128_t>(std::cosh(f128));
42 check_result<boost::float128_t>(std::tanh(f128));
43 check_result<boost::float128_t>(std::asinh(f128));
44 check_result<boost::float128_t>(std::acosh(f128));
45 check_result<boost::float128_t>(std::atanh(f128));
46 check_result<boost::float128_t>(std::fmod(f128, f128));
47 check_result<boost::float128_t>(std::atan2(f128, f128));
48 check_result<boost::float128_t>(std::lgamma(f128));
49 check_result<boost::float128_t>(std::tgamma(f128));
50 check_result<boost::float128_t>(std::remainder(f128, f128));
51 check_result<boost::float128_t>(std::remquo(f128, f128, 0));
52 check_result<boost::float128_t>(std::fma(f128, f128, f128));
53 check_result<boost::float128_t>(std::fmax(f128, f128));
54 check_result<boost::float128_t>(std::fmin(f128, f128));
55 check_result<boost::float128_t>(std::fdim(f128, f128));
56 #if __LDBL_MANT_DIG__ == 113
57 check_result<boost::float128_t>(std::nanl(""));
58 #else
59 check_result<boost::float128_t>(std::nanq(""));
60 #endif
61 check_result<boost::float128_t>(std::exp2(f128));
62 check_result<boost::float128_t>(std::log2(f128));
63 check_result<boost::float128_t>(std::log1p(f128));
64 check_result<boost::float128_t>(std::cbrt(f128));
65 check_result<boost::float128_t>(std::hypot(f128, f128));
66 check_result<boost::float128_t>(std::erf(f128));
67 check_result<boost::float128_t>(std::erfc(f128));
68 check_result<long long>(std::llround(f128));
69 check_result<long>(std::lround(f128));
70 check_result<boost::float128_t>(std::round(f128));
71 check_result<boost::float128_t>(std::nearbyint(f128));
72 check_result<long long>(std::llrint(f128));
73 check_result<long>(std::lrint(f128));
74 check_result<boost::float128_t>(std::rint(f128));
75 check_result<boost::float128_t>(std::modf(f128, nullptr));
76 check_result<boost::float128_t>(std::scalbln(f128, 0));
77 check_result<boost::float128_t>(std::scalbn(f128, 0));
78 check_result<int>(std::ilogb(f128));
79 check_result<boost::float128_t>(std::logb(f128));
80 check_result<boost::float128_t>(std::nextafter(f128, f128));
81 check_result<boost::float128_t>(std::nexttoward(f128, f128));
82 check_result<boost::float128_t>(std::copysign(f128, f128));
83 check_result<bool>(std::signbit(f128));
84 check_result<int>(std::fpclassify(f128));
85 check_result<bool>(std::isfinite(f128));
86 check_result<bool>(std::isinf(f128));
87 check_result<bool>(std::isnan(f128));
88 check_result<bool>(std::isnormal(f128));
89 check_result<bool>(std::isgreater(f128, f128));
90 check_result<bool>(std::isgreaterequal(f128, f128));
91 check_result<bool>(std::isless(f128, f128));
92 check_result<bool>(std::islessequal(f128, f128));
93 check_result<bool>(std::islessgreater(f128, f128));
94 check_result<bool>(std::isunordered(f128, f128));
95 #endif // boost::float128_t
96 }