gcc/libstdc++-v3/testsuite/util/specfun_testcase.h
Edward Smith-Rowland 2be75957b8 Implement TR29124 C++ special Math Functions.
2016-01-14  Edward Smith-Rowland  <3dw4rd@verizon.net>
	    Jonathan Wakely  <jwakely@redhat.com>
	    Florian Goth <CaptainSifff@gmx.de>

	Implement TR29124 C++ special Math Functions.
	* include/Makefile.am: Add new headers.
	* include/Makefile.in: Regenerate.
	* include/bits/specfun.h: New.
	* include/c_global/cmath: Adjust for both tr1 and tr29124 maths.
	* include/tr1/bessel_function.tcc: Ditto.
	* include/tr1/beta_function.tcc: Ditto.
	* include/tr1/cmath: Ditto.
	* include/tr1/ell_integral.tcc: Ditto.
	* include/tr1/exp_integral.tcc: Ditto.
	* include/tr1/gamma.tcc: Ditto.
	* include/tr1/hypergeometric.tcc: Ditto.
	* include/tr1/legendre_function.tcc: Ditto.
	* include/tr1/modified_bessel_func.tcc: Ditto.
	* include/tr1/poly_hermite.tcc: Ditto.
	* include/tr1/poly_laguerre.tcc: Ditto.
	* include/tr1/riemann_zeta.tcc: Ditto.
	* include/tr1/special_function_util.h: Ditto.
	* testsuite/ext/special_functions/conf_hyperg: New.
	* testsuite/ext/special_functions/conf_hyperg/check_nan.cc: New.
	* testsuite/ext/special_functions/conf_hyperg/check_value.cc: New.
	* testsuite/ext/special_functions/conf_hyperg/compile.cc: New.
	* testsuite/ext/special_functions/hyperg: New.
	* testsuite/ext/special_functions/hyperg/check_nan.cc: New.
	* testsuite/ext/special_functions/hyperg/check_value.cc: New.
	* testsuite/ext/special_functions/hyperg/compile.cc: New.
	* testsuite/libstdc++-dg/conformance.exp: Add special_functions directory.
	* testsuite/special_functions/01_assoc_laguerre/check_nan.cc: New.
	* testsuite/special_functions/01_assoc_laguerre/check_value.cc: New.
	* testsuite/special_functions/01_assoc_laguerre/compile.cc: New.
	* testsuite/special_functions/01_assoc_laguerre/compile_2.cc: New.
	* testsuite/special_functions/02_assoc_legendre/check_nan.cc: New.
	* testsuite/special_functions/02_assoc_legendre/check_value.cc: New.
	* testsuite/special_functions/02_assoc_legendre/compile.cc: New.
	* testsuite/special_functions/02_assoc_legendre/compile_2.cc: New.
	* testsuite/special_functions/03_beta/check_nan.cc: New.
	* testsuite/special_functions/03_beta/check_value.cc: New.
	* testsuite/special_functions/03_beta/compile.cc: New.
	* testsuite/special_functions/03_beta/compile_2.cc: New.
	* testsuite/special_functions/04_comp_ellint_1/check_nan.cc: New.
	* testsuite/special_functions/04_comp_ellint_1/check_value.cc: New.
	* testsuite/special_functions/04_comp_ellint_1/compile.cc: New.
	* testsuite/special_functions/04_comp_ellint_1/compile_2.cc: New.
	* testsuite/special_functions/05_comp_ellint_2/check_nan.cc: New.
	* testsuite/special_functions/05_comp_ellint_2/check_value.cc: New.
	* testsuite/special_functions/05_comp_ellint_2/compile.cc: New.
	* testsuite/special_functions/05_comp_ellint_2/compile_2.cc: New.
	* testsuite/special_functions/06_comp_ellint_3/check_nan.cc: New.
	* testsuite/special_functions/06_comp_ellint_3/check_value.cc: New.
	* testsuite/special_functions/06_comp_ellint_3/compile.cc: New.
	* testsuite/special_functions/06_comp_ellint_3/compile_2.cc: New.
	* testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: New.
	* testsuite/special_functions/07_cyl_bessel_i/check_value.cc: New.
	* testsuite/special_functions/07_cyl_bessel_i/compile.cc: New.
	* testsuite/special_functions/07_cyl_bessel_i/compile_2.cc: New.
	* testsuite/special_functions/07_cyl_bessel_i/pr56216.cc: New.
	* testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: New.
	* testsuite/special_functions/08_cyl_bessel_j/check_value.cc: New.
	* testsuite/special_functions/08_cyl_bessel_j/compile.cc: New.
	* testsuite/special_functions/08_cyl_bessel_j/compile_2.cc: New.
	* testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: New.
	* testsuite/special_functions/09_cyl_bessel_k/check_value.cc: New.
	* testsuite/special_functions/09_cyl_bessel_k/compile.cc: New.
	* testsuite/special_functions/09_cyl_bessel_k/compile_2.cc: New.
	* testsuite/special_functions/10_cyl_neumann/check_nan.cc: New.
	* testsuite/special_functions/10_cyl_neumann/check_value.cc: New.
	* testsuite/special_functions/10_cyl_neumann/compile.cc: New.
	* testsuite/special_functions/10_cyl_neumann/compile_2.cc: New.
	* testsuite/special_functions/11_ellint_1/check_nan.cc: New.
	* testsuite/special_functions/11_ellint_1/check_value.cc: New.
	* testsuite/special_functions/11_ellint_1/compile.cc: New.
	* testsuite/special_functions/11_ellint_1/compile_2.cc: New.
	* testsuite/special_functions/12_ellint_2/check_nan.cc: New.
	* testsuite/special_functions/12_ellint_2/check_value.cc: New.
	* testsuite/special_functions/12_ellint_2/compile.cc: New.
	* testsuite/special_functions/12_ellint_2/compile_2.cc: New.
	* testsuite/special_functions/13_ellint_3/check_nan.cc: New.
	* testsuite/special_functions/13_ellint_3/check_value.cc: New.
	* testsuite/special_functions/13_ellint_3/compile.cc: New.
	* testsuite/special_functions/13_ellint_3/compile_2.cc: New.
	* testsuite/special_functions/14_expint/check_nan.cc: New.
	* testsuite/special_functions/14_expint/check_value.cc: New.
	* testsuite/special_functions/14_expint/compile.cc: New.
	* testsuite/special_functions/14_expint/compile_2.cc: New.
	* testsuite/special_functions/15_hermite/check_nan.cc: New.
	* testsuite/special_functions/15_hermite/check_value.cc: New.
	* testsuite/special_functions/15_hermite/compile.cc: New.
	* testsuite/special_functions/15_hermite/compile_2.cc: New.
	* testsuite/special_functions/16_laguerre/check_nan.cc: New.
	* testsuite/special_functions/16_laguerre/check_value.cc: New.
	* testsuite/special_functions/16_laguerre/compile.cc: New.
	* testsuite/special_functions/16_laguerre/compile_2.cc: New.
	* testsuite/special_functions/17_legendre/check_nan.cc: New.
	* testsuite/special_functions/17_legendre/check_value.cc: New.
	* testsuite/special_functions/17_legendre/compile.cc: New.
	* testsuite/special_functions/17_legendre/compile_2.cc: New.
	* testsuite/special_functions/18_riemann_zeta/check_nan.cc: New.
	* testsuite/special_functions/18_riemann_zeta/check_value.cc: New.
	* testsuite/special_functions/18_riemann_zeta/compile.cc: New.
	* testsuite/special_functions/18_riemann_zeta/compile_2.cc: New.
	* testsuite/special_functions/19_sph_bessel/check_nan.cc: New.
	* testsuite/special_functions/19_sph_bessel/check_value.cc: New.
	* testsuite/special_functions/19_sph_bessel/compile.cc: New.
	* testsuite/special_functions/19_sph_bessel/compile_2.cc: New.
	* testsuite/special_functions/20_sph_legendre/check_nan.cc: New.
	* testsuite/special_functions/20_sph_legendre/check_value.cc: New.
	* testsuite/special_functions/20_sph_legendre/compile.cc: New.
	* testsuite/special_functions/20_sph_legendre/compile_2.cc: New.
	* testsuite/special_functions/21_sph_neumann/check_nan.cc: New.
	* testsuite/special_functions/21_sph_neumann/check_value.cc: New.
	* testsuite/special_functions/21_sph_neumann/compile.cc: New.
	* testsuite/special_functions/21_sph_neumann/compile_2.cc: New.
	* testsuite/util/specfun_testcase.h: New.
	* testsuite/tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/check_value.cc: More testcases.
	* testsuite/tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_value.cc: Ditto.
	* testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/check_value.cc: Ditto.
	* testsuite/tr1/5_numerical_facilities/special_functions/11_cyl_neumann/check_value.cc: Ditto.
	* testsuite/tr1/5_numerical_facilities/special_functions/21_sph_bessel/check_value.cc: Ditto.
	* testsuite/tr1/5_numerical_facilities/special_functions/23_sph_neumann/check_value.cc: Ditto.
	* testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_value.cc: New.


Co-Authored-By: Florian Goth <CaptainSifff@gmx.de>
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>

From-SVN: r232377
2016-01-14 18:12:43 +00:00

417 lines
6.4 KiB
C++

// Copyright (C) 2015 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// testcase.h
//
// These are little PODs for special function inputs and
// expexted results for the testsuite.
//
#ifndef _GLIBCXX_SPECFUN_TESTCASE_H
#define _GLIBCXX_SPECFUN_TESTCASE_H
// Associated Laguerre polynomials.
template<typename _Tp>
struct testcase_assoc_laguerre
{
_Tp f0;
unsigned int n;
unsigned int m;
_Tp x;
_Tp f;
};
// Associated Legendre functions.
template<typename _Tp>
struct testcase_assoc_legendre
{
_Tp f0;
unsigned int l;
unsigned int m;
_Tp x;
_Tp f;
};
// Beta function.
template<typename _Tp>
struct testcase_beta
{
_Tp f0;
_Tp x;
_Tp y;
_Tp f;
};
// Complete elliptic integrals of the first kind.
template<typename _Tp>
struct testcase_comp_ellint_1
{
_Tp f0;
_Tp k;
_Tp f;
};
// Complete elliptic integrals of the second kind.
template<typename _Tp>
struct testcase_comp_ellint_2
{
_Tp f0;
_Tp k;
_Tp f;
};
// Complete elliptic integrals of the third kind.
template<typename _Tp>
struct testcase_comp_ellint_3
{
_Tp f0;
_Tp k;
_Tp nu;
_Tp f;
};
// Confluent hypergeometric functions.
template<typename _Tp>
struct testcase_conf_hyperg
{
_Tp f0;
_Tp a;
_Tp c;
_Tp x;
_Tp f;
};
// Generic cylindrical Bessel functions.
template<typename _Tp>
struct testcase_cyl_bessel
{
_Tp f0;
_Tp nu;
_Tp x;
_Tp f;
};
// Regular modified cylindrical Bessel functions.
template<typename _Tp>
struct testcase_cyl_bessel_i
{
_Tp f0;
_Tp nu;
_Tp x;
_Tp f;
};
// Cylindrical Bessel functions (of the first kind).
template<typename _Tp>
struct testcase_cyl_bessel_j
{
_Tp f0;
_Tp nu;
_Tp x;
_Tp f;
};
// Irregular modified cylindrical Bessel functions.
template<typename _Tp>
struct testcase_cyl_bessel_k
{
_Tp f0;
_Tp nu;
_Tp x;
_Tp f;
};
// Cylindrical Neumann functions.
template<typename _Tp>
struct testcase_cyl_neumann
{
_Tp f0;
_Tp nu;
_Tp x;
_Tp f;
};
// Elliptic integrals of the first kind.
template<typename _Tp>
struct testcase_ellint_1
{
_Tp f0;
_Tp k;
_Tp phi;
_Tp f;
};
// Elliptic integrals of the second kind.
template<typename _Tp>
struct testcase_ellint_2
{
_Tp f0;
_Tp k;
_Tp phi;
_Tp f;
};
// Elliptic integrals of the third kind.
template<typename _Tp>
struct testcase_ellint_3
{
_Tp f0;
_Tp k;
_Tp nu;
_Tp phi;
_Tp f;
};
// Exponential integral.
template<typename _Tp>
struct testcase_expint
{
_Tp f0;
_Tp x;
_Tp f;
};
// Hermite polynomials
template<typename _Tp>
struct testcase_hermite
{
_Tp f0;
unsigned int n;
_Tp x;
_Tp f;
};
// Hypergeometric functions.
template<typename _Tp>
struct testcase_hyperg
{
_Tp f0;
_Tp a;
_Tp b;
_Tp c;
_Tp x;
_Tp f;
};
// Laguerre polynomials.
template<typename _Tp>
struct testcase_laguerre
{
_Tp f0;
unsigned int n;
_Tp x;
_Tp f;
};
// Legendre polynomials.
template<typename _Tp>
struct testcase_legendre
{
_Tp f0;
unsigned int l;
_Tp x;
_Tp f;
};
// Riemann zeta function.
template<typename _Tp>
struct testcase_riemann_zeta
{
_Tp f0;
_Tp s;
_Tp f;
};
// Hurwitz zeta function.
template<typename _Tp>
struct testcase_hurwitz_zeta
{
_Tp f0;
_Tp s;
_Tp a;
_Tp f;
};
// Spherical Bessel functions.
template<typename _Tp>
struct testcase_sph_bessel
{
_Tp f0;
unsigned int n;
_Tp x;
_Tp f;
};
// Regular modified spherical Bessel functions.
template<typename _Tp>
struct testcase_sph_bessel_i
{
_Tp f0;
unsigned int n;
_Tp x;
_Tp f;
};
// Irregular modified spherical Bessel functions.
template<typename _Tp>
struct testcase_sph_bessel_k
{
_Tp f0;
unsigned int n;
_Tp x;
_Tp f;
};
// Spherical Legendre functions.
template<typename _Tp>
struct testcase_sph_legendre
{
_Tp f0;
unsigned int l;
unsigned int m;
_Tp theta;
_Tp f;
};
// Spherical Neumann functions.
template<typename _Tp>
struct testcase_sph_neumann
{
_Tp f0;
unsigned int n;
_Tp x;
_Tp f;
};
// Airy Ai functions.
template<typename _Tp>
struct testcase_airy_ai
{
_Tp f0;
_Tp x;
_Tp f;
};
// Airy Bi functions.
template<typename _Tp>
struct testcase_airy_bi
{
_Tp f0;
_Tp x;
_Tp f;
};
// Upper incomplete gamma functions.
template<typename _Tp>
struct testcase_gamma_u
{
_Tp f0;
_Tp n;
_Tp x;
_Tp f;
};
// Lower incomplete gamma functions.
template<typename _Tp>
struct testcase_gamma_l
{
_Tp f0;
_Tp n;
_Tp x;
_Tp f;
};
// Dilogarithm functions.
template<typename _Tp>
struct testcase_dilog
{
_Tp f0;
_Tp x;
_Tp f;
};
// Digamma functions.
template<typename _Tp>
struct testcase_gamma
{
_Tp f0;
_Tp x;
_Tp f;
};
template<typename _Tp>
struct testcase_comp_ellint_rf
{
_Tp f0;
_Tp x;
_Tp y;
_Tp f;
};
template<typename _Tp>
struct testcase_ellint_rf
{
_Tp f0;
_Tp x;
_Tp y;
_Tp z;
_Tp f;
};
template<typename _Tp>
struct testcase_ellint_rj
{
_Tp f0;
_Tp x;
_Tp y;
_Tp z;
_Tp p;
_Tp f;
};
template<typename _Tp>
struct testcase_ellint_rd
{
_Tp f0;
_Tp x;
_Tp y;
_Tp z;
_Tp f;
};
template<typename _Tp>
struct testcase_comp_ellint_rg
{
_Tp f0;
_Tp x;
_Tp y;
_Tp f;
};
template<typename _Tp>
struct testcase_ellint_rg
{
_Tp f0;
_Tp x;
_Tp y;
_Tp z;
_Tp f;
};
#endif // _GLIBCXX_SPECFUN_TESTCASE_H