1 // { dg-do run { target c++11 } }
2 // { dg-require-c-std "" }
3 // { dg-add-options ieee }
4 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
6 // Copyright (C) 2016 Free Software Foundation, Inc.
8 // This file is part of the GNU ISO C++ Library. This library is free
9 // software; you can redistribute it and/or modify it under the
10 // terms of the GNU General Public License as published by the
11 // Free Software Foundation; either version 3, or (at your option)
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
19 // You should have received a copy of the GNU General Public License along
20 // with this library; see the file COPYING3. If not see
21 // <http://www.gnu.org/licenses/>.
26 #include <testsuite_hooks.h>
31 float af
= std::numeric_limits
<float>::quiet_NaN();
32 double ad
= std::numeric_limits
<double>::quiet_NaN();
33 long double al
= std::numeric_limits
<long double>::quiet_NaN();
37 long double bl
= 10.0L;
41 long double cl
= 3.0L;
45 long double xl
= 0.5L;
47 float a
= __gnu_cxx::hyperg(af
, bf
, cf
, xf
);
48 float b
= __gnu_cxx::hypergf(af
, bf
, cf
, xf
);
49 double c
= __gnu_cxx::hyperg(ad
, bd
, cd
, xd
);
50 long double d
= __gnu_cxx::hyperg(al
, bl
, cl
, xl
);
51 long double e
= __gnu_cxx::hypergl(al
, bl
, cl
, xl
);
53 bool test
[[gnu::unused
]] = true;
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 bool test
[[gnu::unused
]] = true;
89 VERIFY(std::isnan(a
));
90 VERIFY(std::isnan(b
));
91 VERIFY(std::isnan(c
));
92 VERIFY(std::isnan(d
));
93 VERIFY(std::isnan(e
));
103 long double al
= 2.0L;
107 long double bl
= 10.0L;
109 float cf
= std::numeric_limits
<float>::quiet_NaN();
110 double cd
= std::numeric_limits
<double>::quiet_NaN();
111 long double cl
= std::numeric_limits
<long double>::quiet_NaN();
115 long double xl
= 0.5L;
117 float a
= __gnu_cxx::hyperg(af
, bf
, cf
, xf
);
118 float b
= __gnu_cxx::hypergf(af
, bf
, cf
, xf
);
119 double c
= __gnu_cxx::hyperg(ad
, bd
, cd
, xd
);
120 long double d
= __gnu_cxx::hyperg(al
, bl
, cl
, xl
);
121 long double e
= __gnu_cxx::hypergl(al
, bl
, cl
, xl
);
123 bool test
[[gnu::unused
]] = true;
124 VERIFY(std::isnan(a
));
125 VERIFY(std::isnan(b
));
126 VERIFY(std::isnan(c
));
127 VERIFY(std::isnan(d
));
128 VERIFY(std::isnan(e
));
138 long double al
= 2.0L;
142 long double bl
= 10.0L;
146 long double cl
= 3.0L;
148 float xf
= std::numeric_limits
<float>::quiet_NaN();
149 double xd
= std::numeric_limits
<double>::quiet_NaN();
150 long double xl
= std::numeric_limits
<long double>::quiet_NaN();
152 float a
= __gnu_cxx::hyperg(af
, bf
, cf
, xf
);
153 float b
= __gnu_cxx::hypergf(af
, bf
, cf
, xf
);
154 double c
= __gnu_cxx::hyperg(ad
, bd
, cd
, xd
);
155 long double d
= __gnu_cxx::hyperg(al
, bl
, cl
, xl
);
156 long double e
= __gnu_cxx::hypergl(al
, bl
, cl
, xl
);
158 bool test
[[gnu::unused
]] = true;
159 VERIFY(std::isnan(a
));
160 VERIFY(std::isnan(b
));
161 VERIFY(std::isnan(c
));
162 VERIFY(std::isnan(d
));
163 VERIFY(std::isnan(e
));