]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/ext/special_functions/airy_bi/check_nan.cc
1 // { dg-do run { target c++11 } }
2 // { dg-require-c-std "" }
3 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
4 // { dg-add-options ieee }
5 // { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
6 // { dg-prune-output ".*warning: tgammal has lower than advertised precision" }
8 // Copyright (C) 2016-2024 Free Software Foundation, Inc.
10 // This file is part of the GNU ISO C++ Library. This library is free
11 // software; you can redistribute it and/or modify it under the
12 // terms of the GNU General Public License as published by the
13 // Free Software Foundation; either version 3, or (at your option)
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
21 // You should have received a copy of the GNU General Public License along
22 // with this library; see the file COPYING3. If not see
23 // <http://www.gnu.org/licenses/>.
28 #include <testsuite_hooks.h>
33 float xf
= std::numeric_limits
<float>::quiet_NaN();
34 double xd
= std::numeric_limits
<double>::quiet_NaN();
35 long double xl
= std::numeric_limits
<long double>::quiet_NaN();
37 float a
= __gnu_cxx::airy_bi(xf
);
38 float b
= __gnu_cxx::airy_bif(xf
);
39 double c
= __gnu_cxx::airy_bi(xd
);
40 long double d
= __gnu_cxx::airy_bi(xl
);
41 long double e
= __gnu_cxx::airy_bil(xl
);
43 bool test
[[gnu::unused
]] = true;
44 VERIFY(std::isnan(a
));
45 VERIFY(std::isnan(b
));
46 VERIFY(std::isnan(c
));
47 VERIFY(std::isnan(d
));
48 VERIFY(std::isnan(e
));