specfun_testcase.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. // Copyright (C) 2015-2022 Free Software Foundation, Inc.
  2. //
  3. // This file is part of the GNU ISO C++ Library. This library is free
  4. // software; you can redistribute it and/or modify it under the
  5. // terms of the GNU General Public License as published by the
  6. // Free Software Foundation; either version 2, or (at your option)
  7. // any later version.
  8. //
  9. // This library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License along
  15. // with this library; see the file COPYING3. If not see
  16. // <http://www.gnu.org/licenses/>.
  17. // testcase.h
  18. //
  19. // These are little PODs for special function inputs and
  20. // expexted results for the testsuite.
  21. //
  22. #ifndef _GLIBCXX_SPECFUN_TESTCASE_H
  23. #define _GLIBCXX_SPECFUN_TESTCASE_H
  24. // Associated Laguerre polynomials.
  25. template<typename _Tp>
  26. struct testcase_assoc_laguerre
  27. {
  28. _Tp f0;
  29. unsigned int n;
  30. unsigned int m;
  31. _Tp x;
  32. _Tp f;
  33. };
  34. // Associated Legendre functions.
  35. template<typename _Tp>
  36. struct testcase_assoc_legendre
  37. {
  38. _Tp f0;
  39. unsigned int l;
  40. unsigned int m;
  41. _Tp x;
  42. _Tp f;
  43. };
  44. // Beta function.
  45. template<typename _Tp>
  46. struct testcase_beta
  47. {
  48. _Tp f0;
  49. _Tp x;
  50. _Tp y;
  51. _Tp f;
  52. };
  53. // Complete elliptic integrals of the first kind.
  54. template<typename _Tp>
  55. struct testcase_comp_ellint_1
  56. {
  57. _Tp f0;
  58. _Tp k;
  59. _Tp f;
  60. };
  61. // Complete elliptic integrals of the second kind.
  62. template<typename _Tp>
  63. struct testcase_comp_ellint_2
  64. {
  65. _Tp f0;
  66. _Tp k;
  67. _Tp f;
  68. };
  69. // Complete elliptic integrals of the third kind.
  70. template<typename _Tp>
  71. struct testcase_comp_ellint_3
  72. {
  73. _Tp f0;
  74. _Tp k;
  75. _Tp nu;
  76. _Tp f;
  77. };
  78. // Confluent hypergeometric functions.
  79. template<typename _Tp>
  80. struct testcase_conf_hyperg
  81. {
  82. _Tp f0;
  83. _Tp a;
  84. _Tp c;
  85. _Tp x;
  86. _Tp f;
  87. };
  88. // Generic cylindrical Bessel functions.
  89. template<typename _Tp>
  90. struct testcase_cyl_bessel
  91. {
  92. _Tp f0;
  93. _Tp nu;
  94. _Tp x;
  95. _Tp f;
  96. };
  97. // Regular modified cylindrical Bessel functions.
  98. template<typename _Tp>
  99. struct testcase_cyl_bessel_i
  100. {
  101. _Tp f0;
  102. _Tp nu;
  103. _Tp x;
  104. _Tp f;
  105. };
  106. // Cylindrical Bessel functions (of the first kind).
  107. template<typename _Tp>
  108. struct testcase_cyl_bessel_j
  109. {
  110. _Tp f0;
  111. _Tp nu;
  112. _Tp x;
  113. _Tp f;
  114. };
  115. // Irregular modified cylindrical Bessel functions.
  116. template<typename _Tp>
  117. struct testcase_cyl_bessel_k
  118. {
  119. _Tp f0;
  120. _Tp nu;
  121. _Tp x;
  122. _Tp f;
  123. };
  124. // Cylindrical Neumann functions.
  125. template<typename _Tp>
  126. struct testcase_cyl_neumann
  127. {
  128. _Tp f0;
  129. _Tp nu;
  130. _Tp x;
  131. _Tp f;
  132. };
  133. // Elliptic integrals of the first kind.
  134. template<typename _Tp>
  135. struct testcase_ellint_1
  136. {
  137. _Tp f0;
  138. _Tp k;
  139. _Tp phi;
  140. _Tp f;
  141. };
  142. // Elliptic integrals of the second kind.
  143. template<typename _Tp>
  144. struct testcase_ellint_2
  145. {
  146. _Tp f0;
  147. _Tp k;
  148. _Tp phi;
  149. _Tp f;
  150. };
  151. // Elliptic integrals of the third kind.
  152. template<typename _Tp>
  153. struct testcase_ellint_3
  154. {
  155. _Tp f0;
  156. _Tp k;
  157. _Tp nu;
  158. _Tp phi;
  159. _Tp f;
  160. };
  161. // Exponential integral.
  162. template<typename _Tp>
  163. struct testcase_expint
  164. {
  165. _Tp f0;
  166. _Tp x;
  167. _Tp f;
  168. };
  169. // Hermite polynomials
  170. template<typename _Tp>
  171. struct testcase_hermite
  172. {
  173. _Tp f0;
  174. unsigned int n;
  175. _Tp x;
  176. _Tp f;
  177. };
  178. // Hypergeometric functions.
  179. template<typename _Tp>
  180. struct testcase_hyperg
  181. {
  182. _Tp f0;
  183. _Tp a;
  184. _Tp b;
  185. _Tp c;
  186. _Tp x;
  187. _Tp f;
  188. };
  189. // Laguerre polynomials.
  190. template<typename _Tp>
  191. struct testcase_laguerre
  192. {
  193. _Tp f0;
  194. unsigned int n;
  195. _Tp x;
  196. _Tp f;
  197. };
  198. // Legendre polynomials.
  199. template<typename _Tp>
  200. struct testcase_legendre
  201. {
  202. _Tp f0;
  203. unsigned int l;
  204. _Tp x;
  205. _Tp f;
  206. };
  207. // Riemann zeta function.
  208. template<typename _Tp>
  209. struct testcase_riemann_zeta
  210. {
  211. _Tp f0;
  212. _Tp s;
  213. _Tp f;
  214. };
  215. // Hurwitz zeta function.
  216. template<typename _Tp>
  217. struct testcase_hurwitz_zeta
  218. {
  219. _Tp f0;
  220. _Tp s;
  221. _Tp a;
  222. _Tp f;
  223. };
  224. // Spherical Bessel functions.
  225. template<typename _Tp>
  226. struct testcase_sph_bessel
  227. {
  228. _Tp f0;
  229. unsigned int n;
  230. _Tp x;
  231. _Tp f;
  232. };
  233. // Regular modified spherical Bessel functions.
  234. template<typename _Tp>
  235. struct testcase_sph_bessel_i
  236. {
  237. _Tp f0;
  238. unsigned int n;
  239. _Tp x;
  240. _Tp f;
  241. };
  242. // Irregular modified spherical Bessel functions.
  243. template<typename _Tp>
  244. struct testcase_sph_bessel_k
  245. {
  246. _Tp f0;
  247. unsigned int n;
  248. _Tp x;
  249. _Tp f;
  250. };
  251. // Spherical Legendre functions.
  252. template<typename _Tp>
  253. struct testcase_sph_legendre
  254. {
  255. _Tp f0;
  256. unsigned int l;
  257. unsigned int m;
  258. _Tp theta;
  259. _Tp f;
  260. };
  261. // Spherical Neumann functions.
  262. template<typename _Tp>
  263. struct testcase_sph_neumann
  264. {
  265. _Tp f0;
  266. unsigned int n;
  267. _Tp x;
  268. _Tp f;
  269. };
  270. // Airy Ai functions.
  271. template<typename _Tp>
  272. struct testcase_airy_ai
  273. {
  274. _Tp f0;
  275. _Tp x;
  276. _Tp f;
  277. };
  278. // Airy Bi functions.
  279. template<typename _Tp>
  280. struct testcase_airy_bi
  281. {
  282. _Tp f0;
  283. _Tp x;
  284. _Tp f;
  285. };
  286. // Upper incomplete gamma functions.
  287. template<typename _Tp>
  288. struct testcase_gamma_u
  289. {
  290. _Tp f0;
  291. _Tp n;
  292. _Tp x;
  293. _Tp f;
  294. };
  295. // Lower incomplete gamma functions.
  296. template<typename _Tp>
  297. struct testcase_gamma_l
  298. {
  299. _Tp f0;
  300. _Tp n;
  301. _Tp x;
  302. _Tp f;
  303. };
  304. // Dilogarithm functions.
  305. template<typename _Tp>
  306. struct testcase_dilog
  307. {
  308. _Tp f0;
  309. _Tp x;
  310. _Tp f;
  311. };
  312. // Digamma functions.
  313. template<typename _Tp>
  314. struct testcase_gamma
  315. {
  316. _Tp f0;
  317. _Tp x;
  318. _Tp f;
  319. };
  320. template<typename _Tp>
  321. struct testcase_comp_ellint_rf
  322. {
  323. _Tp f0;
  324. _Tp x;
  325. _Tp y;
  326. _Tp f;
  327. };
  328. template<typename _Tp>
  329. struct testcase_ellint_rf
  330. {
  331. _Tp f0;
  332. _Tp x;
  333. _Tp y;
  334. _Tp z;
  335. _Tp f;
  336. };
  337. template<typename _Tp>
  338. struct testcase_ellint_rj
  339. {
  340. _Tp f0;
  341. _Tp x;
  342. _Tp y;
  343. _Tp z;
  344. _Tp p;
  345. _Tp f;
  346. };
  347. template<typename _Tp>
  348. struct testcase_ellint_rd
  349. {
  350. _Tp f0;
  351. _Tp x;
  352. _Tp y;
  353. _Tp z;
  354. _Tp f;
  355. };
  356. template<typename _Tp>
  357. struct testcase_comp_ellint_rg
  358. {
  359. _Tp f0;
  360. _Tp x;
  361. _Tp y;
  362. _Tp f;
  363. };
  364. template<typename _Tp>
  365. struct testcase_ellint_rg
  366. {
  367. _Tp f0;
  368. _Tp x;
  369. _Tp y;
  370. _Tp z;
  371. _Tp f;
  372. };
  373. #endif // _GLIBCXX_SPECFUN_TESTCASE_H