]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/02_assoc_legendre/pr86655.cc
2 // { dg-options "-std=c++98 -ffp-contract=off" }
4 // Copyright (C) 2019-2023 Free Software Foundation, Inc.
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option)
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
22 #if defined(__TEST_DEBUG)
27 std::cout << "line " << __LINE__ \
28 << " std::tr1::assoc_legendre(l, m, x) == 0: " << (A) \
32 # include <testsuite_hooks.h>
35 template<typename _Tp
>
39 bool test
__attribute__((unused
)) = true;
40 unsigned int larr
[4] = {0u, 1u, 2u, 5u};
41 for (unsigned int l
= 0; l
< 4; ++l
)
42 for (unsigned int m
= larr
[l
] + 1u; m
<= larr
[l
] + 2u; ++m
)
43 for (int i
= -2; i
<= +2; ++i
)
45 _Tp x
= _Tp(i
* 0.5L);
46 VERIFY(std::tr1::assoc_legendre(larr
[l
], m
, x
) == _Tp(0));
54 test_m_gt_l
<double>();
55 test_m_gt_l
<long double>();