]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/ext/special_functions/conf_hyperg/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++*" } }
7 // Copyright (C) 2016-2023 Free Software Foundation, Inc.
9 // This file is part of the GNU ISO C++ Library. This library is free
10 // software; you can redistribute it and/or modify it under the
11 // terms of the GNU General Public License as published by the
12 // Free Software Foundation; either version 3, or (at your option)
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
20 // You should have received a copy of the GNU General Public License along
21 // with this library; see the file COPYING3. If not see
22 // <http://www.gnu.org/licenses/>.
27 #include <testsuite_hooks.h>
32 float af
= std::numeric_limits
<float>::quiet_NaN();
33 double ad
= std::numeric_limits
<double>::quiet_NaN();
34 long double al
= std::numeric_limits
<long double>::quiet_NaN();
38 long double cl
= 3.0L;
42 long double xl
= 0.5L;
44 float a
= __gnu_cxx::conf_hyperg(af
, cf
, xf
);
45 float b
= __gnu_cxx::conf_hypergf(af
, cf
, xf
);
46 double c
= __gnu_cxx::conf_hyperg(ad
, cd
, xd
);
47 long double d
= __gnu_cxx::conf_hyperg(al
, cl
, xl
);
48 long double e
= __gnu_cxx::conf_hypergl(al
, cl
, xl
);
50 VERIFY(std::isnan(a
));
51 VERIFY(std::isnan(b
));
52 VERIFY(std::isnan(c
));
53 VERIFY(std::isnan(d
));
54 VERIFY(std::isnan(e
));
64 long double al
= 2.0L;
66 float cf
= std::numeric_limits
<float>::quiet_NaN();
67 double cd
= std::numeric_limits
<double>::quiet_NaN();
68 long double cl
= std::numeric_limits
<long double>::quiet_NaN();
72 long double xl
= 0.5L;
74 float a
= __gnu_cxx::conf_hyperg(af
, cf
, xf
);
75 float b
= __gnu_cxx::conf_hypergf(af
, cf
, xf
);
76 double c
= __gnu_cxx::conf_hyperg(ad
, cd
, xd
);
77 long double d
= __gnu_cxx::conf_hyperg(al
, cl
, xl
);
78 long double e
= __gnu_cxx::conf_hypergl(al
, cl
, xl
);
80 VERIFY(std::isnan(a
));
81 VERIFY(std::isnan(b
));
82 VERIFY(std::isnan(c
));
83 VERIFY(std::isnan(d
));
84 VERIFY(std::isnan(e
));
94 long double al
= 2.0L;
98 long double cl
= 3.0L;
100 float xf
= std::numeric_limits
<float>::quiet_NaN();
101 double xd
= std::numeric_limits
<double>::quiet_NaN();
102 long double xl
= std::numeric_limits
<long double>::quiet_NaN();
104 float a
= __gnu_cxx::conf_hyperg(af
, cf
, xf
);
105 float b
= __gnu_cxx::conf_hypergf(af
, cf
, xf
);
106 double c
= __gnu_cxx::conf_hyperg(ad
, cd
, xd
);
107 long double d
= __gnu_cxx::conf_hyperg(al
, cl
, xl
);
108 long double e
= __gnu_cxx::conf_hypergl(al
, cl
, xl
);
110 VERIFY(std::isnan(a
));
111 VERIFY(std::isnan(b
));
112 VERIFY(std::isnan(c
));
113 VERIFY(std::isnan(d
));
114 VERIFY(std::isnan(e
));