]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/ext/special_functions/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-2021 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 bl
= 10.0L;
42 long double cl
= 3.0L;
46 long double xl
= 0.5L;
48 float a
= __gnu_cxx::hyperg(af
, bf
, cf
, xf
);
49 float b
= __gnu_cxx::hypergf(af
, bf
, cf
, xf
);
50 double c
= __gnu_cxx::hyperg(ad
, bd
, cd
, xd
);
51 long double d
= __gnu_cxx::hyperg(al
, bl
, cl
, xl
);
52 long double e
= __gnu_cxx::hypergl(al
, bl
, cl
, xl
);
54 VERIFY(std::isnan(a
));
55 VERIFY(std::isnan(b
));
56 VERIFY(std::isnan(c
));
57 VERIFY(std::isnan(d
));
58 VERIFY(std::isnan(e
));
68 long double al
= 2.0L;
70 float bf
= std::numeric_limits
<float>::quiet_NaN();
71 double bd
= std::numeric_limits
<double>::quiet_NaN();
72 long double bl
= std::numeric_limits
<long double>::quiet_NaN();
76 long double cl
= 3.0L;
80 long double xl
= 0.5L;
82 float a
= __gnu_cxx::hyperg(af
, bf
, cf
, xf
);
83 float b
= __gnu_cxx::hypergf(af
, bf
, cf
, xf
);
84 double c
= __gnu_cxx::hyperg(ad
, bd
, cd
, xd
);
85 long double d
= __gnu_cxx::hyperg(al
, bl
, cl
, xl
);
86 long double e
= __gnu_cxx::hypergl(al
, bl
, cl
, xl
);
88 VERIFY(std::isnan(a
));
89 VERIFY(std::isnan(b
));
90 VERIFY(std::isnan(c
));
91 VERIFY(std::isnan(d
));
92 VERIFY(std::isnan(e
));
102 long double al
= 2.0L;
106 long double bl
= 10.0L;
108 float cf
= std::numeric_limits
<float>::quiet_NaN();
109 double cd
= std::numeric_limits
<double>::quiet_NaN();
110 long double cl
= std::numeric_limits
<long double>::quiet_NaN();
114 long double xl
= 0.5L;
116 float a
= __gnu_cxx::hyperg(af
, bf
, cf
, xf
);
117 float b
= __gnu_cxx::hypergf(af
, bf
, cf
, xf
);
118 double c
= __gnu_cxx::hyperg(ad
, bd
, cd
, xd
);
119 long double d
= __gnu_cxx::hyperg(al
, bl
, cl
, xl
);
120 long double e
= __gnu_cxx::hypergl(al
, bl
, cl
, xl
);
122 VERIFY(std::isnan(a
));
123 VERIFY(std::isnan(b
));
124 VERIFY(std::isnan(c
));
125 VERIFY(std::isnan(d
));
126 VERIFY(std::isnan(e
));
136 long double al
= 2.0L;
140 long double bl
= 10.0L;
144 long double cl
= 3.0L;
146 float xf
= std::numeric_limits
<float>::quiet_NaN();
147 double xd
= std::numeric_limits
<double>::quiet_NaN();
148 long double xl
= std::numeric_limits
<long double>::quiet_NaN();
150 float a
= __gnu_cxx::hyperg(af
, bf
, cf
, xf
);
151 float b
= __gnu_cxx::hypergf(af
, bf
, cf
, xf
);
152 double c
= __gnu_cxx::hyperg(ad
, bd
, cd
, xd
);
153 long double d
= __gnu_cxx::hyperg(al
, bl
, cl
, xl
);
154 long double e
= __gnu_cxx::hypergl(al
, bl
, cl
, xl
);
156 VERIFY(std::isnan(a
));
157 VERIFY(std::isnan(b
));
158 VERIFY(std::isnan(c
));
159 VERIFY(std::isnan(d
));
160 VERIFY(std::isnan(e
));