1 // { dg-require-c-std "" }
2 // { dg-add-options ieee }
3 // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" }
5 // Copyright (C) 2016 Free Software Foundation, Inc.
7 // This file is part of the GNU ISO C++ Library. This library is free
8 // software; you can redistribute it and/or modify it under the
9 // terms of the GNU General Public License as published by the
10 // Free Software Foundation; either version 3, or (at your option)
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License along
19 // with this library; see the file COPYING3. If not see
20 // <http://www.gnu.org/licenses/>.
25 #include <testsuite_hooks.h>
30 float af
= std::numeric_limits
<float>::quiet_NaN();
31 double ad
= std::numeric_limits
<double>::quiet_NaN();
32 long double al
= std::numeric_limits
<long double>::quiet_NaN();
36 long double bl
= 10.0L;
40 long double cl
= 3.0L;
44 long double xl
= 0.5L;
46 float a
= __gnu_cxx::hyperg(af
, bf
, cf
, xf
);
47 float b
= __gnu_cxx::hypergf(af
, bf
, cf
, xf
);
48 double c
= __gnu_cxx::hyperg(ad
, bd
, cd
, xd
);
49 long double d
= __gnu_cxx::hyperg(al
, bl
, cl
, xl
);
50 long double e
= __gnu_cxx::hypergl(al
, bl
, cl
, xl
);
52 bool test
[[gnu::unused
]] = true;
53 VERIFY(std::isnan(a
));
54 VERIFY(std::isnan(b
));
55 VERIFY(std::isnan(c
));
56 VERIFY(std::isnan(d
));
57 VERIFY(std::isnan(e
));
67 long double al
= 2.0L;
69 float bf
= std::numeric_limits
<float>::quiet_NaN();
70 double bd
= std::numeric_limits
<double>::quiet_NaN();
71 long double bl
= std::numeric_limits
<long double>::quiet_NaN();
75 long double cl
= 3.0L;
79 long double xl
= 0.5L;
81 float a
= __gnu_cxx::hyperg(af
, bf
, cf
, xf
);
82 float b
= __gnu_cxx::hypergf(af
, bf
, cf
, xf
);
83 double c
= __gnu_cxx::hyperg(ad
, bd
, cd
, xd
);
84 long double d
= __gnu_cxx::hyperg(al
, bl
, cl
, xl
);
85 long double e
= __gnu_cxx::hypergl(al
, bl
, cl
, xl
);
87 bool test
[[gnu::unused
]] = true;
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 bool test
[[gnu::unused
]] = true;
123 VERIFY(std::isnan(a
));
124 VERIFY(std::isnan(b
));
125 VERIFY(std::isnan(c
));
126 VERIFY(std::isnan(d
));
127 VERIFY(std::isnan(e
));
137 long double al
= 2.0L;
141 long double bl
= 10.0L;
145 long double cl
= 3.0L;
147 float xf
= std::numeric_limits
<float>::quiet_NaN();
148 double xd
= std::numeric_limits
<double>::quiet_NaN();
149 long double xl
= std::numeric_limits
<long double>::quiet_NaN();
151 float a
= __gnu_cxx::hyperg(af
, bf
, cf
, xf
);
152 float b
= __gnu_cxx::hypergf(af
, bf
, cf
, xf
);
153 double c
= __gnu_cxx::hyperg(ad
, bd
, cd
, xd
);
154 long double d
= __gnu_cxx::hyperg(al
, bl
, cl
, xl
);
155 long double e
= __gnu_cxx::hypergl(al
, bl
, cl
, xl
);
157 bool test
[[gnu::unused
]] = true;
158 VERIFY(std::isnan(a
));
159 VERIFY(std::isnan(b
));
160 VERIFY(std::isnan(c
));
161 VERIFY(std::isnan(d
));
162 VERIFY(std::isnan(e
));