]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/math/test/git_issue_705.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / math / test / git_issue_705.cpp
CommitLineData
1e59de90
TL
1// Copyright Matt Borland, 2022
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#include "math_unit_test.hpp"
7#include <cmath>
8#include <boost/math/special_functions/powm1.hpp>
9
10template <typename T>
11void test()
12{
13 CHECK_EQUAL(std::pow(T(0), T(2)) - 1, boost::math::powm1(T(0), T(2)));
14 CHECK_EQUAL(std::pow(T(0), T(-2)) - 1, boost::math::powm1(T(0), T(-2)));
15 CHECK_EQUAL(std::pow(T(0), T(0.1)) - 1, boost::math::powm1(T(0), T(0.1)));
16 CHECK_EQUAL(std::pow(T(0), T(-0.1)) - 1, boost::math::powm1(T(0), T(-0.1)));
17}
18
19int main()
20{
21 test<float>();
22 test<double>();
23
24 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
25 test<long double>();
26 #endif
27
28 return boost::math::test::report_errors();
29}