mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-09 09:24:59 -04:00
Squashed 'boost/' content from commit b4feb19f2
git-subtree-dir: boost git-subtree-split: b4feb19f287ee92d87a9624b5d36b7cf46aeadeb
This commit is contained in:
@@ -0,0 +1,161 @@
|
||||
# Copyright Daryle Walker, Hubert Holin, John Maddock 2006 - 2007
|
||||
# copyright Paul A. Bristow 2006 - 2010
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt.
|
||||
# \math_toolkit\libs\math\test\jamfile.v2
|
||||
# Runs all math toolkit tests, functions & distributions,
|
||||
# and build math examples.
|
||||
|
||||
# bring in the rules for testing
|
||||
import testing ;
|
||||
import modules ;
|
||||
import path ;
|
||||
import pch ;
|
||||
import ../../../config/checks/config : requires ;
|
||||
using quickbook ;
|
||||
using auto-index ;
|
||||
|
||||
project
|
||||
: requirements
|
||||
<include>../../include_private
|
||||
;
|
||||
|
||||
if $(is_unix)
|
||||
{
|
||||
local osname = [ SHELL uname ] ;
|
||||
|
||||
switch $(osname)
|
||||
{
|
||||
case "Sun*" : OTHERFLAGS = "-lpthread -lrt" ;
|
||||
case "*BSD*" : OTHERFLAGS = "-lpthread" ;
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Configuration first:
|
||||
#
|
||||
lib gsl ;
|
||||
lib gslcblas ;
|
||||
lib Rmath ;
|
||||
obj has_libstdcxx_tr1 : has_libstdcxx_tr1.cpp ;
|
||||
explicit has_libstdcxx_tr1 ;
|
||||
obj has_c99_cmath : has_c99_cmath.cpp ;
|
||||
explicit has_c99_cmath ;
|
||||
exe has_gsl : has_gsl.cpp gsl gslcblas ;
|
||||
explicit has_gsl ;
|
||||
exe has_rmath : has_rmath.cpp Rmath ;
|
||||
explicit has_rmath ;
|
||||
|
||||
CEPHES_SOURCE = acosh.c airy.c asin.c asinh.c atan.c atanh.c bdtr.c beta.c
|
||||
btdtr.c cbrt.c chbevl.c chdtr.c clog.c cmplx.c const.c
|
||||
cosh.c dawsn.c drand.c ei.c ellie.c ellik.c ellpe.c ellpj.c ellpk.c
|
||||
exp.c exp10.c exp2.c expn.c expx2.c fabs.c fac.c fdtr.c
|
||||
fresnl.c gamma.c gdtr.c hyp2f1.c hyperg.c i0.c i1.c igami.c incbet.c
|
||||
incbi.c igam.c isnan.c iv.c j0.c j1.c jn.c jv.c k0.c k1.c kn.c kolmogorov.c
|
||||
log.c log2.c log10.c lrand.c nbdtr.c ndtr.c ndtri.c pdtr.c planck.c
|
||||
polevl.c polmisc.c polylog.c polyn.c pow.c powi.c psi.c rgamma.c round.c
|
||||
shichi.c sici.c sin.c sindg.c sinh.c spence.c stdtr.c struve.c
|
||||
tan.c tandg.c tanh.c unity.c yn.c zeta.c zetac.c
|
||||
sqrt.c floor.c setprec.c mtherr.c ;
|
||||
|
||||
path-constant here : . ;
|
||||
make $(here)/third_party/cephes_double/acosh.c : : @check_exists ;
|
||||
actions check_exists
|
||||
{
|
||||
stat $(<)
|
||||
}
|
||||
explicit $(here)/third_party/cephes_double/acosh.c ;
|
||||
|
||||
lib cephes_double : $(here)/third_party/cephes_double/$(CEPHES_SOURCE)
|
||||
:
|
||||
release
|
||||
<link>static
|
||||
[ check-target-builds $(here)/third_party/cephes_double/acosh.c : : <build>no ]
|
||||
;
|
||||
|
||||
explicit cephes_double ;
|
||||
|
||||
rule all-tests {
|
||||
local result ;
|
||||
for local source in [ glob test*.cpp ]
|
||||
{
|
||||
result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework
|
||||
: : :
|
||||
[ check-target-builds has_gsl : <define>ALWAYS_TEST_DOUBLE : ]
|
||||
<target-os>linux:<linkflags>-lpthread
|
||||
<target-os>linux:<linkflags>-lrt
|
||||
<toolset>gcc:<linkflags>$(OTHERFLAGS) ]
|
||||
;
|
||||
result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework
|
||||
: : : [ check-target-builds has_libstdcxx_tr1 : <define>TEST_LIBSTDCXX : <build>no ]
|
||||
<target-os>linux:<linkflags>-lpthread
|
||||
<target-os>linux:<linkflags>-lrt
|
||||
<toolset>gcc:<linkflags>$(OTHERFLAGS)
|
||||
: $(source:B)_libstdcxx_tr1 ]
|
||||
;
|
||||
result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework
|
||||
: : : [ check-target-builds has_c99_cmath : <define>TEST_C99 : <build>no ]
|
||||
<target-os>linux:<linkflags>-lpthread
|
||||
<target-os>linux:<linkflags>-lrt
|
||||
<toolset>gcc:<linkflags>$(OTHERFLAGS)
|
||||
: $(source:B)_c99 ]
|
||||
;
|
||||
result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework gsl gslcblas
|
||||
: : : [ check-target-builds has_gsl : <define>TEST_GSL : <build>no ]
|
||||
<target-os>linux:<linkflags>-lpthread
|
||||
<target-os>linux:<linkflags>-lrt
|
||||
<toolset>gcc:<linkflags>$(OTHERFLAGS)
|
||||
: $(source:B)_gsl ]
|
||||
;
|
||||
result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework Rmath
|
||||
: : : [ check-target-builds has_rmath : <define>TEST_RMATH : <build>no ]
|
||||
<target-os>linux:<linkflags>-lpthread
|
||||
<target-os>linux:<linkflags>-lrt
|
||||
<toolset>gcc:<linkflags>$(OTHERFLAGS)
|
||||
: $(source:B)_rmath ]
|
||||
;
|
||||
result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework cephes_double
|
||||
: : : [ check-target-builds $(here)/third_party/cephes_double/acosh.c : <define>TEST_CEPHES <source>cephes_double : <build>no ]
|
||||
<target-os>linux:<linkflags>-lpthread
|
||||
<target-os>linux:<linkflags>-lrt
|
||||
<toolset>gcc:<linkflags>$(OTHERFLAGS)
|
||||
: $(source:B)_cephes ]
|
||||
;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
test-suite report_gen : [ all-tests ] ;
|
||||
|
||||
path-constant images_location : html ;
|
||||
path-constant here : . ;
|
||||
|
||||
xml report : doc/report.qbk : <dependency>report_gen ;
|
||||
boostbook standalone
|
||||
:
|
||||
report
|
||||
:
|
||||
# Path for links to Boost:
|
||||
<xsl:param>boost.root=../../../../..
|
||||
|
||||
# Some general style settings:
|
||||
<xsl:param>table.footnote.number.format=1
|
||||
<xsl:param>footnote.number.format=1
|
||||
<xsl:param>html.stylesheet=http://www.boost.org/doc/libs/1_58_0/doc/src/boostbook.css
|
||||
|
||||
# HTML options first:
|
||||
# Use graphics not text for navigation:
|
||||
<xsl:param>navig.graphics=1
|
||||
# How far down we chunk nested sections, basically all of them:
|
||||
<xsl:param>chunk.section.depth=0
|
||||
# Don't put the first section on the same page as the TOC:
|
||||
<xsl:param>chunk.first.sections=0
|
||||
# How far down sections get TOC's
|
||||
<xsl:param>toc.section.depth=2
|
||||
# Max depth in each TOC:
|
||||
<xsl:param>toc.max.depth=4
|
||||
# How far down we go with TOC's
|
||||
<xsl:param>generate.section.toc.level=10
|
||||
;
|
||||
|
||||
@@ -0,0 +1,750 @@
|
||||
// Copyright John Maddock 2015.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MATH_BINDINGS
|
||||
#define BOOST_MATH_BINDINGS
|
||||
|
||||
#define ERROR_REPORTING_MODE
|
||||
|
||||
#if TEST_LIBSTDCXX
|
||||
|
||||
#include <tr1/cmath>
|
||||
#include <stdexcept>
|
||||
|
||||
#define TEST_LIBRARY_NAME "<tr1/cmath>"
|
||||
|
||||
#define LOG1P_FUNCTION_TO_TEST std::tr1::log1p
|
||||
#define EXPM1_FUNCTION_TO_TEST std::tr1::log1p
|
||||
|
||||
#define CBRT_FUNCTION_TO_TEST std::tr1::cbrt
|
||||
#define ERF_FUNCTION_TO_TEST std::tr1::erf
|
||||
#define ERFC_FUNCTION_TO_TEST std::tr1::erfc
|
||||
|
||||
#define LGAMMA_FUNCTION_TO_TEST std::tr1::lgamma
|
||||
#define TGAMMA_FUNCTION_TO_TEST std::tr1::tgamma
|
||||
|
||||
#define BESSEL_I_FUNCTION_TO_TEST std::tr1::cyl_bessel_i
|
||||
#define BESSEL_IN_FUNCTION_TO_TEST std::tr1::cyl_bessel_i
|
||||
#define BESSEL_J_FUNCTION_TO_TEST std::tr1::cyl_bessel_j
|
||||
#define BESSEL_JN_FUNCTION_TO_TEST std::tr1::cyl_bessel_j
|
||||
#define BESSEL_JS_FUNCTION_TO_TEST std::tr1::sph_bessel
|
||||
#define BESSEL_K_FUNCTION_TO_TEST std::tr1::cyl_bessel_k
|
||||
#define BESSEL_KN_FUNCTION_TO_TEST std::tr1::cyl_bessel_k
|
||||
#define BESSEL_Y_FUNCTION_TO_TEST std::tr1::cyl_neumann
|
||||
#define BESSEL_YN_FUNCTION_TO_TEST std::tr1::cyl_neumann
|
||||
#define BESSEL_YS_FUNCTION_TO_TEST std::tr1::sph_neumann
|
||||
|
||||
#define BETA_FUNCTION_TO_TEST std::tr1::beta
|
||||
|
||||
#define ELLINT_1_FUNCTION_TO_TEST std::tr1::ellint_1
|
||||
#define ELLINT_1C_FUNCTION_TO_TEST std::tr1::comp_ellint_1
|
||||
#define ELLINT_2_FUNCTION_TO_TEST std::tr1::ellint_2
|
||||
#define ELLINT_2C_FUNCTION_TO_TEST std::tr1::comp_ellint_2
|
||||
#define ELLINT_3_FUNCTION_TO_TEST std::tr1::ellint_3
|
||||
#define ELLINT_3C_FUNCTION_TO_TEST std::tr1::comp_ellint_3
|
||||
|
||||
#define EI_FUNCTION_TO_TEST std::tr1::expint
|
||||
|
||||
#define LAGUERRE_FUNCTION_TO_TEST std::tr1::laguerre
|
||||
#define ASSOC_LAGUERRE_FUNCTION_TO_TEST std::tr1::assoc_laguerre
|
||||
|
||||
inline long double legendre_p_binder(int i, long double d)
|
||||
{
|
||||
if(i < 0)
|
||||
throw std::domain_error("order parameters less than 0 not supported in TR1");
|
||||
return std::tr1::legendre(i, d);
|
||||
}
|
||||
inline long double assoc_legendre_p_binder(int i, int j, long double d)
|
||||
{
|
||||
if((i < 0) || (j < 0))
|
||||
throw std::domain_error("order parameters less than 0 not supported in TR1");
|
||||
return std::tr1::assoc_legendre(i, j, d);
|
||||
}
|
||||
|
||||
#define LEGENDRE_P_FUNCTION_TO_TEST legendre_p_binder
|
||||
#define LEGENDRE_PA_FUNCTION_TO_TEST assoc_legendre_p_binder
|
||||
#define ZETA_FUNCTION_TO_TEST std::tr1::riemann_zeta
|
||||
|
||||
#define TYPE_TO_TEST long double
|
||||
|
||||
#elif defined(TEST_C99)
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#define TEST_LIBRARY_NAME "<math.h>"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#define LOG1P_FUNCTION_TO_TEST ::log1p
|
||||
#define EXPM1_FUNCTION_TO_TEST ::expm1
|
||||
|
||||
#define CBRT_FUNCTION_TO_TEST ::cbrt
|
||||
#define ERF_FUNCTION_TO_TEST ::erf
|
||||
#define ERFC_FUNCTION_TO_TEST ::erfc
|
||||
|
||||
#define LGAMMA_FUNCTION_TO_TEST ::lgamma
|
||||
#define TGAMMA_FUNCTION_TO_TEST ::tgamma
|
||||
#define BESSEL_JN_FUNCTION_TO_TEST ::jn
|
||||
#define BESSEL_YN_FUNCTION_TO_TEST ::yn
|
||||
|
||||
#define TYPE_TO_TEST double
|
||||
|
||||
#else
|
||||
|
||||
#define LOG1P_FUNCTION_TO_TEST ::log1pl
|
||||
#define EXPM1_FUNCTION_TO_TEST ::expm1l
|
||||
|
||||
#define CBRT_FUNCTION_TO_TEST ::cbrtl
|
||||
#define ERF_FUNCTION_TO_TEST ::erfl
|
||||
#define ERFC_FUNCTION_TO_TEST ::erfcl
|
||||
|
||||
#define LGAMMA_FUNCTION_TO_TEST ::lgammal
|
||||
#define TGAMMA_FUNCTION_TO_TEST ::tgammal
|
||||
//#define BESSEL_JN_FUNCTION_TO_TEST ::jnl
|
||||
//#define BESSEL_JN_FUNCTION_TO_TEST ::ynl
|
||||
|
||||
#define TYPE_TO_TEST long double
|
||||
#endif
|
||||
|
||||
#elif defined(TEST_GSL)
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include <gsl/gsl_sf.h>
|
||||
#include <gsl/gsl_errno.h>
|
||||
#include <gsl/gsl_version.h>
|
||||
|
||||
#define TEST_LIBRARY_NAME "GSL " GSL_VERSION
|
||||
|
||||
void gsl_handler(const char * reason, const char * file, int line, int gsl_errno)
|
||||
{
|
||||
if(gsl_errno == GSL_ERANGE) return; // handle zero or infinity in our test code.
|
||||
throw std::domain_error(reason);
|
||||
}
|
||||
|
||||
struct gsl_error_handler_setter
|
||||
{
|
||||
gsl_error_handler_t * old_handler;
|
||||
gsl_error_handler_setter()
|
||||
{
|
||||
old_handler = gsl_set_error_handler(gsl_handler);
|
||||
}
|
||||
~gsl_error_handler_setter()
|
||||
{
|
||||
gsl_set_error_handler(old_handler);
|
||||
}
|
||||
};
|
||||
|
||||
static const gsl_error_handler_setter handler;
|
||||
|
||||
inline double gsl_bessel_ys(unsigned i, double d)
|
||||
{
|
||||
return gsl_sf_bessel_yl(i, d);
|
||||
}
|
||||
|
||||
inline double gsl_bessel_js(unsigned i, double d)
|
||||
{
|
||||
return gsl_sf_bessel_jl(i, d);
|
||||
}
|
||||
|
||||
//#define CBRT_FUNCTION_TO_TEST boost::cbrt
|
||||
#define ERF_FUNCTION_TO_TEST gsl_sf_erf
|
||||
#define ERFC_FUNCTION_TO_TEST gsl_sf_erfc
|
||||
//#define ERF_INV_FUNCTION_TO_TEST boost::math::erf_inv
|
||||
//#define ERFC_INV_FUNCTION_TO_TEST boost::math::erfc_inv
|
||||
|
||||
#define LGAMMA_FUNCTION_TO_TEST gsl_sf_lngamma
|
||||
#define TGAMMA_FUNCTION_TO_TEST gsl_sf_gamma
|
||||
//#define TGAMMA1PM1_FUNCTION_TO_TEST boost::math::tgamma1pm1
|
||||
|
||||
#define BESSEL_I_FUNCTION_TO_TEST gsl_sf_bessel_Inu
|
||||
#define BESSEL_IN_FUNCTION_TO_TEST gsl_sf_bessel_In
|
||||
//#define BESSEL_IP_FUNCTION_TO_TEST boost::math::cyl_bessel_i_prime
|
||||
//#define BESSEL_IPN_FUNCTION_TO_TEST boost::math::cyl_bessel_i_prime
|
||||
#define BESSEL_J_FUNCTION_TO_TEST gsl_sf_bessel_Jnu
|
||||
#define BESSEL_JN_FUNCTION_TO_TEST gsl_sf_bessel_Jn
|
||||
#define BESSEL_JS_FUNCTION_TO_TEST gsl_bessel_js
|
||||
//#define BESSEL_JP_FUNCTION_TO_TEST boost::math::cyl_bessel_j_prime
|
||||
//#define BESSEL_JPN_FUNCTION_TO_TEST boost::math::cyl_bessel_j_prime
|
||||
//#define BESSEL_JPS_FUNCTION_TO_TEST boost::math::sph_bessel_prime
|
||||
#define BESSEL_K_FUNCTION_TO_TEST gsl_sf_bessel_Knu
|
||||
#define BESSEL_KN_FUNCTION_TO_TEST gsl_sf_bessel_Kn
|
||||
//#define BESSEL_KP_FUNCTION_TO_TEST boost::math::cyl_bessel_k_prime
|
||||
//#define BESSEL_KPN_FUNCTION_TO_TEST boost::math::cyl_bessel_k_prime
|
||||
#define BESSEL_Y_FUNCTION_TO_TEST gsl_sf_bessel_Ynu
|
||||
#define BESSEL_YN_FUNCTION_TO_TEST gsl_sf_bessel_Yn
|
||||
#define BESSEL_YS_FUNCTION_TO_TEST gsl_bessel_ys
|
||||
//#define BESSEL_YP_FUNCTION_TO_TEST boost::math::cyl_neumann_prime
|
||||
//#define BESSEL_YNP_FUNCTION_TO_TEST boost::math::cyl_neumann_prime
|
||||
//#define BESSEL_YSP_FUNCTION_TO_TEST boost::math::sph_neumann_prime
|
||||
|
||||
#define BETA_FUNCTION_TO_TEST gsl_sf_beta
|
||||
//#define BINOMIAL_FUNCTION_TO_TEST boost::math::binomial_coefficient<T>
|
||||
|
||||
inline double RC(double a, double b)
|
||||
{
|
||||
return gsl_sf_ellint_RC(a, b, GSL_PREC_DOUBLE);
|
||||
}
|
||||
inline double RD(double a, double b, double c)
|
||||
{
|
||||
return gsl_sf_ellint_RD(a, b, c, GSL_PREC_DOUBLE);
|
||||
}
|
||||
inline double RF(double a, double b, double c)
|
||||
{
|
||||
return gsl_sf_ellint_RF(a, b, c, GSL_PREC_DOUBLE);
|
||||
}
|
||||
inline double RJ(double a, double b, double c, double d)
|
||||
{
|
||||
return gsl_sf_ellint_RJ(a, b, c, d, GSL_PREC_DOUBLE);
|
||||
}
|
||||
|
||||
|
||||
#define ELLINT_RC_FUNCTION_TO_TEST RC
|
||||
#define ELLINT_RD_FUNCTION_TO_TEST RD
|
||||
#define ELLINT_RF_FUNCTION_TO_TEST RF
|
||||
//#define ELLINT_RG_FUNCTION_TO_TEST boost::math::ellint_rg
|
||||
#define ELLINT_RJ_FUNCTION_TO_TEST RJ
|
||||
|
||||
#define DIGAMMA_FUNCTION_TO_TEST gsl_sf_psi
|
||||
|
||||
inline double ellintK(double a) { return gsl_sf_ellint_Kcomp(a, GSL_PREC_DOUBLE); }
|
||||
inline double ellintE(double a) { return gsl_sf_ellint_Ecomp(a, GSL_PREC_DOUBLE); }
|
||||
inline double ellintP(double a, double b) { return gsl_sf_ellint_Pcomp(a, -b, GSL_PREC_DOUBLE); }
|
||||
|
||||
inline double ellintF(double a, double b) { return gsl_sf_ellint_F(b, a, GSL_PREC_DOUBLE); }
|
||||
inline double ellintE2(double a, double b) { return gsl_sf_ellint_E(b, a, GSL_PREC_DOUBLE); }
|
||||
inline double ellintP3(double a, double b, double c) { return gsl_sf_ellint_P(c, a, -b, GSL_PREC_DOUBLE); }
|
||||
inline double ellintD2(double a, double b) { return gsl_sf_ellint_D(b, a, 0.0, GSL_PREC_DOUBLE); }
|
||||
|
||||
#define ELLINT_1_FUNCTION_TO_TEST ellintF
|
||||
#define ELLINT_1C_FUNCTION_TO_TEST ellintK
|
||||
#define ELLINT_2_FUNCTION_TO_TEST ellintE2
|
||||
#define ELLINT_2C_FUNCTION_TO_TEST ellintE
|
||||
#define ELLINT_3_FUNCTION_TO_TEST ellintP3
|
||||
#define ELLINT_3C_FUNCTION_TO_TEST ellintP
|
||||
#define ELLINT_D2_FUNCTION_TO_TEST ellintD2
|
||||
//#define ELLINT_D1_FUNCTION_TO_TEST boost::math::ellint_d
|
||||
|
||||
#define EI_FUNCTION_TO_TEST gsl_sf_expint_Ei
|
||||
#define EN_FUNCTION_TO_TEST gsl_sf_expint_En
|
||||
|
||||
//#define HERMITE_FUNCTION_TO_TEST boost::math::hermite
|
||||
//#define HEUMAN_LAMBDA_FUNCTION_TO_TEST boost::math::heuman_lambda
|
||||
|
||||
//#define BETA_INC_FUNCTION_TO_TEST boost::math::beta
|
||||
//#define BETAC_INC_FUNCTION_TO_TEST boost::math::betac
|
||||
#define IBETA_FUNCTION_TO_TEST gsl_sf_beta_inc
|
||||
//#define IBETAC_FUNCTION_TO_TEST boost::math::ibetac
|
||||
//#define IBETA_INV_FUNCTION_TO_TEST boost::math::ibeta_inv
|
||||
//#define IBETAC_INV_FUNCTION_TO_TEST boost::math::ibetac_inv
|
||||
//#define IBETA_INVA_FUNCTION_TO_TEST boost::math::ibeta_inva
|
||||
//#define IBETAC_INVA_FUNCTION_TO_TEST boost::math::ibetac_inva
|
||||
//#define IBETA_INVB_FUNCTION_TO_TEST boost::math::ibeta_invb
|
||||
//#define IBETAC_INVB_FUNCTION_TO_TEST boost::math::ibetac_invb
|
||||
|
||||
#define IGAMMA_FUNCTION_TO_TEST gsl_sf_gamma_inc
|
||||
//#define IGAMMAL_FUNCTION_TO_TEST boost::math::tgamma_lower
|
||||
#define GAMMAP_FUNCTION_TO_TEST gsl_sf_gamma_inc_P
|
||||
#define GAMMAQ_FUNCTION_TO_TEST gsl_sf_gamma_inc_Q
|
||||
//#define GAMMAP_INV_FUNCTION_TO_TEST boost::math::gamma_p_inv
|
||||
//#define GAMMAQ_INV_FUNCTION_TO_TEST boost::math::gamma_q_inv
|
||||
//#define GAMMAP_INVA_FUNCTION_TO_TEST boost::math::gamma_p_inva
|
||||
//#define GAMMAQ_INVA_FUNCTION_TO_TEST boost::math::gamma_q_inva
|
||||
|
||||
inline double sn(double k, double u)
|
||||
{
|
||||
double s, c, d;
|
||||
gsl_sf_elljac_e(u, k * k, &s, &c, &d);
|
||||
return s;
|
||||
}
|
||||
inline double cn(double k, double u)
|
||||
{
|
||||
double s, c, d;
|
||||
gsl_sf_elljac_e(u, k * k, &s, &c, &d);
|
||||
return c;
|
||||
}
|
||||
inline double dn(double k, double u)
|
||||
{
|
||||
double s, c, d;
|
||||
gsl_sf_elljac_e(u, k * k, &s, &c, &d);
|
||||
return d;
|
||||
}
|
||||
|
||||
#define SN_FUNCTION_TO_TEST sn
|
||||
#define CN_FUNCTION_TO_TEST cn
|
||||
#define DN_FUNCTION_TO_TEST dn
|
||||
//#define JACOBI_ZETA_FUNCTION_TO_TEST boost::math::jacobi_zeta
|
||||
|
||||
inline double laguerre(unsigned n, unsigned m, double x){ return gsl_sf_laguerre_n(n, m, x); }
|
||||
inline double laguerre_0(unsigned n, double x){ return gsl_sf_laguerre_n(n, 0, x); }
|
||||
|
||||
#define LAGUERRE_FUNCTION_TO_TEST laguerre_0
|
||||
#define ASSOC_LAGUERRE_FUNCTION_TO_TEST laguerre
|
||||
|
||||
inline double legendre_q(unsigned n, double x) { return gsl_sf_legendre_Ql(n, x); }
|
||||
|
||||
#define LEGENDRE_P_FUNCTION_TO_TEST gsl_sf_legendre_Pl
|
||||
#define LEGENDRE_Q_FUNCTION_TO_TEST legendre_q
|
||||
#define LEGENDRE_PA_FUNCTION_TO_TEST gsl_sf_legendre_Plm
|
||||
|
||||
#define POLYGAMMA_FUNCTION_TO_TEST gsl_sf_psi_n
|
||||
//#define TGAMMA_RATIO_FUNCTION_TO_TEST boost::math::tgamma_ratio
|
||||
//#define TGAMMA_DELTA_RATIO_FUNCTION_TO_TEST boost::math::tgamma_delta_ratio
|
||||
//#define SIN_PI_RATIO_FUNCTION_TO_TEST boost::math::sin_pi
|
||||
//#define COS_PI_RATIO_FUNCTION_TO_TEST boost::math::cos_pi
|
||||
#define TRIGAMMA_RATIO_FUNCTION_TO_TEST gsl_sf_psi_1
|
||||
#define ZETA_FUNCTION_TO_TEST gsl_sf_zeta
|
||||
|
||||
#define TYPE_TO_TEST double
|
||||
|
||||
#elif defined(TEST_RMATH)
|
||||
|
||||
#define MATHLIB_STANDALONE
|
||||
#include <Rmath.h>
|
||||
|
||||
#undef trunc
|
||||
|
||||
#define TEST_LIBRARY_NAME "Rmath " R_VERSION_STRING
|
||||
|
||||
#define LOG1P_FUNCTION_TO_TEST log1p
|
||||
#define EXPM1_FUNCTION_TO_TEST expm1
|
||||
|
||||
//#define CBRT_FUNCTION_TO_TEST boost::math::cbrt
|
||||
//#define ERF_FUNCTION_TO_TEST boost::math::erf
|
||||
//#define ERFC_FUNCTION_TO_TEST boost::math::erfc
|
||||
//#define ERF_INV_FUNCTION_TO_TEST boost::math::erf_inv
|
||||
//#define ERFC_INV_FUNCTION_TO_TEST boost::math::erfc_inv
|
||||
|
||||
#define LGAMMA_FUNCTION_TO_TEST lgammafn
|
||||
#define TGAMMA_FUNCTION_TO_TEST gammafn
|
||||
//#define TGAMMA1PM1_FUNCTION_TO_TEST boost::math::tgamma1pm1
|
||||
|
||||
inline double I(double n, double x) { return bessel_i(x, n, 1); }
|
||||
inline double K(double n, double x) { return bessel_k(x, n, 1); }
|
||||
inline double J(double n, double x) { return bessel_j(x, n); }
|
||||
inline double Y(double n, double x) { return bessel_y(x, n); }
|
||||
|
||||
#define BESSEL_I_FUNCTION_TO_TEST I
|
||||
#define BESSEL_IN_FUNCTION_TO_TEST I
|
||||
//#define BESSEL_IP_FUNCTION_TO_TEST boost::math::cyl_bessel_i_prime
|
||||
//#define BESSEL_IPN_FUNCTION_TO_TEST boost::math::cyl_bessel_i_prime
|
||||
#define BESSEL_J_FUNCTION_TO_TEST J
|
||||
#define BESSEL_JN_FUNCTION_TO_TEST J
|
||||
//#define BESSEL_JS_FUNCTION_TO_TEST boost::math::sph_bessel
|
||||
//#define BESSEL_JP_FUNCTION_TO_TEST boost::math::cyl_bessel_j_prime
|
||||
//#define BESSEL_JPN_FUNCTION_TO_TEST boost::math::cyl_bessel_j_prime
|
||||
//#define BESSEL_JPS_FUNCTION_TO_TEST boost::math::sph_bessel_prime
|
||||
#define BESSEL_K_FUNCTION_TO_TEST K
|
||||
#define BESSEL_KN_FUNCTION_TO_TEST K
|
||||
//#define BESSEL_KP_FUNCTION_TO_TEST boost::math::cyl_bessel_k_prime
|
||||
//#define BESSEL_KPN_FUNCTION_TO_TEST boost::math::cyl_bessel_k_prime
|
||||
#define BESSEL_Y_FUNCTION_TO_TEST Y
|
||||
#define BESSEL_YN_FUNCTION_TO_TEST Y
|
||||
//#define BESSEL_YS_FUNCTION_TO_TEST boost::math::sph_neumann
|
||||
//#define BESSEL_YP_FUNCTION_TO_TEST boost::math::cyl_neumann_prime
|
||||
//#define BESSEL_YNP_FUNCTION_TO_TEST boost::math::cyl_neumann_prime
|
||||
//#define BESSEL_YSP_FUNCTION_TO_TEST boost::math::sph_neumann_prime
|
||||
|
||||
#define BETA_FUNCTION_TO_TEST beta
|
||||
//#define BINOMIAL_FUNCTION_TO_TEST boost::math::binomial_coefficient<T>
|
||||
|
||||
//#define ELLINT_RC_FUNCTION_TO_TEST boost::math::ellint_rc
|
||||
//#define ELLINT_RD_FUNCTION_TO_TEST boost::math::ellint_rd
|
||||
//#define ELLINT_RF_FUNCTION_TO_TEST boost::math::ellint_rf
|
||||
//#define ELLINT_RG_FUNCTION_TO_TEST boost::math::ellint_rg
|
||||
//#define ELLINT_RJ_FUNCTION_TO_TEST boost::math::ellint_rj
|
||||
|
||||
#define DIGAMMA_FUNCTION_TO_TEST digamma
|
||||
|
||||
//#define ELLINT_1_FUNCTION_TO_TEST boost::math::ellint_1
|
||||
//#define ELLINT_1C_FUNCTION_TO_TEST boost::math::ellint_1
|
||||
//#define ELLINT_2_FUNCTION_TO_TEST boost::math::ellint_2
|
||||
//#define ELLINT_2C_FUNCTION_TO_TEST boost::math::ellint_2
|
||||
//#define ELLINT_3_FUNCTION_TO_TEST boost::math::ellint_3
|
||||
//#define ELLINT_3C_FUNCTION_TO_TEST boost::math::ellint_3
|
||||
//#define ELLINT_D2_FUNCTION_TO_TEST boost::math::ellint_d
|
||||
//#define ELLINT_D1_FUNCTION_TO_TEST boost::math::ellint_d
|
||||
|
||||
//#define EI_FUNCTION_TO_TEST boost::math::expint
|
||||
//#define EN_FUNCTION_TO_TEST boost::math::expint
|
||||
|
||||
//#define HERMITE_FUNCTION_TO_TEST boost::math::hermite
|
||||
//#define HEUMAN_LAMBDA_FUNCTION_TO_TEST boost::math::heuman_lambda
|
||||
|
||||
inline double ibeta(double a, double b, double x) { return pbeta(x, a, b, 1, 0); }
|
||||
inline double ibetac(double a, double b, double x) { return pbeta(x, a, b, 0, 0); }
|
||||
inline double ibeta_inv(double a, double b, double x) { return qbeta(x, a, b, 1, 0); }
|
||||
inline double ibetac_inv(double a, double b, double x) { return qbeta(x, a, b, 0, 0); }
|
||||
|
||||
//#define BETA_INC_FUNCTION_TO_TEST boost::math::beta
|
||||
//#define BETAC_INC_FUNCTION_TO_TEST boost::math::betac
|
||||
#define IBETA_FUNCTION_TO_TEST ibeta
|
||||
#define IBETAC_FUNCTION_TO_TEST ibetac
|
||||
#define IBETA_INV_FUNCTION_TO_TEST ibeta_inv
|
||||
#define IBETAC_INV_FUNCTION_TO_TEST ibetac_inv
|
||||
//#define IBETA_INVA_FUNCTION_TO_TEST boost::math::ibeta_inva
|
||||
//#define IBETAC_INVA_FUNCTION_TO_TEST boost::math::ibetac_inva
|
||||
//#define IBETA_INVB_FUNCTION_TO_TEST boost::math::ibeta_invb
|
||||
//#define IBETAC_INVB_FUNCTION_TO_TEST boost::math::ibetac_invb
|
||||
|
||||
inline double gamma_p(double a, double x) { return pgamma(x, a, 1.0, 1, 0); }
|
||||
inline double gamma_q(double a, double x) { return pgamma(x, a, 1.0, 0, 0); }
|
||||
inline double gamma_p_inv(double a, double x) { return qgamma(x, a, 1.0, 1, 0); }
|
||||
inline double gamma_q_inv(double a, double x) { return qgamma(x, a, 1.0, 0, 0); }
|
||||
|
||||
//#define IGAMMA_FUNCTION_TO_TEST boost::math::tgamma
|
||||
//#define IGAMMAL_FUNCTION_TO_TEST boost::math::tgamma_lower
|
||||
#define GAMMAP_FUNCTION_TO_TEST gamma_p
|
||||
#define GAMMAQ_FUNCTION_TO_TEST gamma_q
|
||||
#define GAMMAP_INV_FUNCTION_TO_TEST gamma_p_inv
|
||||
#define GAMMAQ_INV_FUNCTION_TO_TEST gamma_q_inv
|
||||
//#define GAMMAP_INVA_FUNCTION_TO_TEST boost::math::gamma_p_inva
|
||||
//#define GAMMAQ_INVA_FUNCTION_TO_TEST boost::math::gamma_q_inva
|
||||
|
||||
//#define SN_FUNCTION_TO_TEST boost::math::jacobi_sn
|
||||
//#define CN_FUNCTION_TO_TEST boost::math::jacobi_cn
|
||||
//#define DN_FUNCTION_TO_TEST boost::math::jacobi_dn
|
||||
//#define JACOBI_ZETA_FUNCTION_TO_TEST boost::math::jacobi_zeta
|
||||
|
||||
//#define LAGUERRE_FUNCTION_TO_TEST boost::math::laguerre
|
||||
//#define ASSOC_LAGUERRE_FUNCTION_TO_TEST boost::math::laguerre
|
||||
|
||||
//#define LEGENDRE_P_FUNCTION_TO_TEST boost::math::legendre_p
|
||||
//#define LEGENDRE_Q_FUNCTION_TO_TEST boost::math::legendre_q
|
||||
//#define LEGENDRE_PA_FUNCTION_TO_TEST boost::math::legendre_p
|
||||
|
||||
inline double polygamma(int n, double x) { return psigamma(x, n); }
|
||||
|
||||
#define POLYGAMMA_FUNCTION_TO_TEST polygamma
|
||||
//#define TGAMMA_RATIO_FUNCTION_TO_TEST boost::math::tgamma_ratio
|
||||
//#define TGAMMA_DELTA_RATIO_FUNCTION_TO_TEST boost::math::tgamma_delta_ratio
|
||||
//#define SIN_PI_RATIO_FUNCTION_TO_TEST sinpi
|
||||
//#define COS_PI_RATIO_FUNCTION_TO_TEST cospi
|
||||
#define TRIGAMMA_RATIO_FUNCTION_TO_TEST trigamma
|
||||
//#define ZETA_FUNCTION_TO_TEST boost::math::zeta
|
||||
|
||||
//#define SQRT1PM1_FUNCTION_TO_TEST boost::math::sqrt1pm1
|
||||
//#define POWM1_FUNCTION_TO_TEST boost::math::powm1
|
||||
//#define OWENS_T_FUNCTION_TO_TEST boost::math::owens_t
|
||||
//#define SPHERICAL_HARMONIC_R_FUNCTION_TO_TEST boost::math::spherical_harmonic_r
|
||||
//#define SPHERICAL_HARMONIC_I_FUNCTION_TO_TEST boost::math::spherical_harmonic_i
|
||||
|
||||
template <class T> T do_nc_beta_cdf(T a, T b, T nc, T x){ return pnbeta(x, a, b, nc, 1, 0); }
|
||||
template <class T> T do_nc_beta_ccdf(T a, T b, T nc, T x){ return pnbeta(x, a, b, nc, 0, 0); }
|
||||
template <class T> T do_nc_chi_squared_cdf(T df, T nc, T x){ return pnchisq(x, df, nc, 1, 0); }
|
||||
template <class T> T do_nc_chi_squared_ccdf(T df, T nc, T x){ return pnchisq(x, df, nc, 0, 0); }
|
||||
template <class T> T do_nc_t_cdf(T df, T nc, T x){ return pnt(x, df, nc, 1, 0); }
|
||||
template <class T> T do_nc_t_ccdf(T df, T nc, T x){ return pnt(x, df, nc, 0, 0); }
|
||||
|
||||
#define NC_BETA_CDF_FUNCTION_TO_TEST do_nc_beta_cdf
|
||||
#define NC_BETA_CCDF_FUNCTION_TO_TEST do_nc_beta_ccdf
|
||||
#define NC_CHI_SQUARED_CDF_FUNCTION_TO_TEST do_nc_chi_squared_cdf
|
||||
#define NC_CHI_SQUARED_CCDF_FUNCTION_TO_TEST do_nc_chi_squared_ccdf
|
||||
#define NC_T_CDF_FUNCTION_TO_TEST do_nc_t_cdf
|
||||
#define NC_T_CCDF_FUNCTION_TO_TEST do_nc_t_ccdf
|
||||
|
||||
#define TYPE_TO_TEST double
|
||||
|
||||
#elif defined(TEST_CEPHES)
|
||||
|
||||
#define TEST_LIBRARY_NAME "Cephes"
|
||||
#define TYPE_TO_TEST double
|
||||
|
||||
extern "C" {
|
||||
|
||||
double log1p(double) throw();
|
||||
double expm1(double) throw();
|
||||
double cbrt(double) throw();
|
||||
double erf(double) throw();
|
||||
double erfc(double) throw();
|
||||
double gamma(double) throw();
|
||||
double lgam(double) throw();
|
||||
|
||||
double iv(double, double) throw();
|
||||
double jv(double, double) throw();
|
||||
double jn(int, double) throw();
|
||||
double kn(int, double) throw();
|
||||
double yn(int, double) throw();
|
||||
|
||||
double beta(double, double)throw();
|
||||
double psi(double);
|
||||
|
||||
double ellik(double, double);
|
||||
double ellpk(double);
|
||||
double ellie(double, double);
|
||||
double ellpe(double);
|
||||
|
||||
double ei(double);
|
||||
// Can't get any sensible values from Cephes expn???
|
||||
//double expn(double, double);
|
||||
|
||||
double incbet(double, double, double);
|
||||
double incbi(double, double, double);
|
||||
|
||||
double igam(double, double);
|
||||
double igamc(double, double);
|
||||
double igami(double, double);
|
||||
|
||||
double ellpj(double u, double m, double *sn, double *cn, double *dn, double *phi);
|
||||
|
||||
double zetac(double);
|
||||
|
||||
}
|
||||
|
||||
inline double ellint_1(double k, double phi) { return ellik(phi, k * k); }
|
||||
inline double ellint_2(double k, double phi) { return ellie(phi, k * k); }
|
||||
inline double ellint_1(double k) { return ellpk(k * k); }
|
||||
inline double ellint_2(double k) { return ellpe(k * k); }
|
||||
|
||||
inline double sn(double k, double u)
|
||||
{
|
||||
double sn, cn, dn, phi;
|
||||
ellpj(u, k * k, &sn, &cn, &dn, &phi);
|
||||
return sn;
|
||||
}
|
||||
inline double cn(double k, double u)
|
||||
{
|
||||
double sn, cn, dn, phi;
|
||||
ellpj(u, k * k, &sn, &cn, &dn, &phi);
|
||||
return cn;
|
||||
}
|
||||
|
||||
inline double dn(double k, double u)
|
||||
{
|
||||
double sn, cn, dn, phi;
|
||||
ellpj(u, k * k, &sn, &cn, &dn, &phi);
|
||||
return dn;
|
||||
}
|
||||
|
||||
#define LOG1P_FUNCTION_TO_TEST log1p
|
||||
#define EXPM1_FUNCTION_TO_TEST expm1
|
||||
|
||||
#define CBRT_FUNCTION_TO_TEST cbrt
|
||||
#define ERF_FUNCTION_TO_TEST erf
|
||||
#define ERFC_FUNCTION_TO_TEST erfc
|
||||
//#define ERF_INV_FUNCTION_TO_TEST boost::math::erf_inv
|
||||
//#define ERFC_INV_FUNCTION_TO_TEST boost::math::erfc_inv
|
||||
|
||||
#define LGAMMA_FUNCTION_TO_TEST lgam
|
||||
#define TGAMMA_FUNCTION_TO_TEST gamma
|
||||
//#define TGAMMA1PM1_FUNCTION_TO_TEST boost::math::tgamma1pm1
|
||||
|
||||
#define BESSEL_I_FUNCTION_TO_TEST iv
|
||||
#define BESSEL_IN_FUNCTION_TO_TEST iv
|
||||
//#define BESSEL_IP_FUNCTION_TO_TEST boost::math::cyl_bessel_i_prime
|
||||
//#define BESSEL_IPN_FUNCTION_TO_TEST boost::math::cyl_bessel_i_prime
|
||||
#define BESSEL_J_FUNCTION_TO_TEST jv
|
||||
#define BESSEL_JN_FUNCTION_TO_TEST jn
|
||||
//#define BESSEL_JS_FUNCTION_TO_TEST boost::math::sph_bessel
|
||||
//#define BESSEL_JP_FUNCTION_TO_TEST boost::math::cyl_bessel_j_prime
|
||||
//#define BESSEL_JPN_FUNCTION_TO_TEST boost::math::cyl_bessel_j_prime
|
||||
//#define BESSEL_JPS_FUNCTION_TO_TEST boost::math::sph_bessel_prime
|
||||
//#define BESSEL_K_FUNCTION_TO_TEST boost::math::cyl_bessel_k
|
||||
#define BESSEL_KN_FUNCTION_TO_TEST kn
|
||||
//#define BESSEL_KP_FUNCTION_TO_TEST boost::math::cyl_bessel_k_prime
|
||||
//#define BESSEL_KPN_FUNCTION_TO_TEST boost::math::cyl_bessel_k_prime
|
||||
//#define BESSEL_Y_FUNCTION_TO_TEST boost::math::cyl_neumann
|
||||
#define BESSEL_YN_FUNCTION_TO_TEST yn
|
||||
//#define BESSEL_YS_FUNCTION_TO_TEST boost::math::sph_neumann
|
||||
//#define BESSEL_YP_FUNCTION_TO_TEST boost::math::cyl_neumann_prime
|
||||
//#define BESSEL_YNP_FUNCTION_TO_TEST boost::math::cyl_neumann_prime
|
||||
//#define BESSEL_YSP_FUNCTION_TO_TEST boost::math::sph_neumann_prime
|
||||
|
||||
#define BETA_FUNCTION_TO_TEST beta
|
||||
//#define BINOMIAL_FUNCTION_TO_TEST boost::math::binomial_coefficient<T>
|
||||
|
||||
//#define ELLINT_RC_FUNCTION_TO_TEST boost::math::ellint_rc
|
||||
//#define ELLINT_RD_FUNCTION_TO_TEST boost::math::ellint_rd
|
||||
//#define ELLINT_RF_FUNCTION_TO_TEST boost::math::ellint_rf
|
||||
//#define ELLINT_RG_FUNCTION_TO_TEST boost::math::ellint_rg
|
||||
//#define ELLINT_RJ_FUNCTION_TO_TEST boost::math::ellint_rj
|
||||
|
||||
#define DIGAMMA_FUNCTION_TO_TEST psi
|
||||
|
||||
#define ELLINT_1_FUNCTION_TO_TEST ellint_1
|
||||
// Can't seem to get sensible answers from Cephes complete elliptic integrals???
|
||||
//#define ELLINT_1C_FUNCTION_TO_TEST ellint_1
|
||||
#define ELLINT_2_FUNCTION_TO_TEST ellint_2
|
||||
//#define ELLINT_2C_FUNCTION_TO_TEST ellint_2
|
||||
//#define ELLINT_3_FUNCTION_TO_TEST boost::math::ellint_3
|
||||
//#define ELLINT_3C_FUNCTION_TO_TEST boost::math::ellint_3
|
||||
//#define ELLINT_D2_FUNCTION_TO_TEST boost::math::ellint_d
|
||||
//#define ELLINT_D1_FUNCTION_TO_TEST boost::math::ellint_d
|
||||
|
||||
#define EI_FUNCTION_TO_TEST ei
|
||||
//#define EN_FUNCTION_TO_TEST expn
|
||||
|
||||
//#define HERMITE_FUNCTION_TO_TEST boost::math::hermite
|
||||
//#define HEUMAN_LAMBDA_FUNCTION_TO_TEST boost::math::heuman_lambda
|
||||
|
||||
//#define BETA_INC_FUNCTION_TO_TEST incbet
|
||||
//#define BETAC_INC_FUNCTION_TO_TEST boost::math::betac
|
||||
#define IBETA_FUNCTION_TO_TEST incbet
|
||||
//#define IBETAC_FUNCTION_TO_TEST boost::math::ibetac
|
||||
#define IBETA_INV_FUNCTION_TO_TEST incbi
|
||||
//#define IBETAC_INV_FUNCTION_TO_TEST boost::math::ibetac_inv
|
||||
//#define IBETA_INVA_FUNCTION_TO_TEST boost::math::ibeta_inva
|
||||
//#define IBETAC_INVA_FUNCTION_TO_TEST boost::math::ibetac_inva
|
||||
//#define IBETA_INVB_FUNCTION_TO_TEST boost::math::ibeta_invb
|
||||
//#define IBETAC_INVB_FUNCTION_TO_TEST boost::math::ibetac_invb
|
||||
|
||||
//#define IGAMMA_FUNCTION_TO_TEST boost::math::tgamma
|
||||
//#define IGAMMAL_FUNCTION_TO_TEST boost::math::tgamma_lower
|
||||
#define GAMMAP_FUNCTION_TO_TEST igam
|
||||
#define GAMMAQ_FUNCTION_TO_TEST igamc
|
||||
//#define GAMMAP_INV_FUNCTION_TO_TEST boost::math::gamma_p_inv
|
||||
#define GAMMAQ_INV_FUNCTION_TO_TEST igami
|
||||
//#define GAMMAP_INVA_FUNCTION_TO_TEST boost::math::gamma_p_inva
|
||||
//#define GAMMAQ_INVA_FUNCTION_TO_TEST boost::math::gamma_q_inva
|
||||
|
||||
#define SN_FUNCTION_TO_TEST sn
|
||||
#define CN_FUNCTION_TO_TEST cn
|
||||
#define DN_FUNCTION_TO_TEST dn
|
||||
|
||||
#define ZETA_FUNCTION_TO_TEST zetac
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/math/distributions/non_central_beta.hpp>
|
||||
#include <boost/math/distributions/non_central_chi_squared.hpp>
|
||||
#include <boost/math/distributions/non_central_t.hpp>
|
||||
|
||||
#define TEST_LIBRARY_NAME "boost"
|
||||
|
||||
#define LOG1P_FUNCTION_TO_TEST boost::math::log1p
|
||||
#define EXPM1_FUNCTION_TO_TEST boost::math::expm1
|
||||
|
||||
#define CBRT_FUNCTION_TO_TEST boost::math::cbrt
|
||||
#define ERF_FUNCTION_TO_TEST boost::math::erf
|
||||
#define ERFC_FUNCTION_TO_TEST boost::math::erfc
|
||||
#define ERF_INV_FUNCTION_TO_TEST boost::math::erf_inv
|
||||
#define ERFC_INV_FUNCTION_TO_TEST boost::math::erfc_inv
|
||||
|
||||
#define LGAMMA_FUNCTION_TO_TEST boost::math::lgamma
|
||||
#define TGAMMA_FUNCTION_TO_TEST boost::math::tgamma
|
||||
#define TGAMMA1PM1_FUNCTION_TO_TEST boost::math::tgamma1pm1
|
||||
|
||||
#define BESSEL_I_FUNCTION_TO_TEST boost::math::cyl_bessel_i
|
||||
#define BESSEL_IN_FUNCTION_TO_TEST boost::math::cyl_bessel_i
|
||||
#define BESSEL_IP_FUNCTION_TO_TEST boost::math::cyl_bessel_i_prime
|
||||
#define BESSEL_IPN_FUNCTION_TO_TEST boost::math::cyl_bessel_i_prime
|
||||
#define BESSEL_J_FUNCTION_TO_TEST boost::math::cyl_bessel_j
|
||||
#define BESSEL_JN_FUNCTION_TO_TEST boost::math::cyl_bessel_j
|
||||
#define BESSEL_JS_FUNCTION_TO_TEST boost::math::sph_bessel
|
||||
#define BESSEL_JP_FUNCTION_TO_TEST boost::math::cyl_bessel_j_prime
|
||||
#define BESSEL_JPN_FUNCTION_TO_TEST boost::math::cyl_bessel_j_prime
|
||||
#define BESSEL_JPS_FUNCTION_TO_TEST boost::math::sph_bessel_prime
|
||||
#define BESSEL_K_FUNCTION_TO_TEST boost::math::cyl_bessel_k
|
||||
#define BESSEL_KN_FUNCTION_TO_TEST boost::math::cyl_bessel_k
|
||||
#define BESSEL_KP_FUNCTION_TO_TEST boost::math::cyl_bessel_k_prime
|
||||
#define BESSEL_KPN_FUNCTION_TO_TEST boost::math::cyl_bessel_k_prime
|
||||
#define BESSEL_Y_FUNCTION_TO_TEST boost::math::cyl_neumann
|
||||
#define BESSEL_YN_FUNCTION_TO_TEST boost::math::cyl_neumann
|
||||
#define BESSEL_YS_FUNCTION_TO_TEST boost::math::sph_neumann
|
||||
#define BESSEL_YP_FUNCTION_TO_TEST boost::math::cyl_neumann_prime
|
||||
#define BESSEL_YNP_FUNCTION_TO_TEST boost::math::cyl_neumann_prime
|
||||
#define BESSEL_YSP_FUNCTION_TO_TEST boost::math::sph_neumann_prime
|
||||
|
||||
#define BETA_FUNCTION_TO_TEST boost::math::beta
|
||||
#define BINOMIAL_FUNCTION_TO_TEST boost::math::binomial_coefficient<T>
|
||||
|
||||
#define ELLINT_RC_FUNCTION_TO_TEST boost::math::ellint_rc
|
||||
#define ELLINT_RD_FUNCTION_TO_TEST boost::math::ellint_rd
|
||||
#define ELLINT_RF_FUNCTION_TO_TEST boost::math::ellint_rf
|
||||
#define ELLINT_RG_FUNCTION_TO_TEST boost::math::ellint_rg
|
||||
#define ELLINT_RJ_FUNCTION_TO_TEST boost::math::ellint_rj
|
||||
|
||||
#define DIGAMMA_FUNCTION_TO_TEST boost::math::digamma
|
||||
|
||||
#define ELLINT_1_FUNCTION_TO_TEST boost::math::ellint_1
|
||||
#define ELLINT_1C_FUNCTION_TO_TEST boost::math::ellint_1
|
||||
#define ELLINT_2_FUNCTION_TO_TEST boost::math::ellint_2
|
||||
#define ELLINT_2C_FUNCTION_TO_TEST boost::math::ellint_2
|
||||
#define ELLINT_3_FUNCTION_TO_TEST boost::math::ellint_3
|
||||
#define ELLINT_3C_FUNCTION_TO_TEST boost::math::ellint_3
|
||||
#define ELLINT_D2_FUNCTION_TO_TEST boost::math::ellint_d
|
||||
#define ELLINT_D1_FUNCTION_TO_TEST boost::math::ellint_d
|
||||
|
||||
#define EI_FUNCTION_TO_TEST boost::math::expint
|
||||
#define EN_FUNCTION_TO_TEST boost::math::expint
|
||||
|
||||
#define HERMITE_FUNCTION_TO_TEST boost::math::hermite
|
||||
#define HEUMAN_LAMBDA_FUNCTION_TO_TEST boost::math::heuman_lambda
|
||||
|
||||
#define BETA_INC_FUNCTION_TO_TEST boost::math::beta
|
||||
#define BETAC_INC_FUNCTION_TO_TEST boost::math::betac
|
||||
#define IBETA_FUNCTION_TO_TEST boost::math::ibeta
|
||||
#define IBETAC_FUNCTION_TO_TEST boost::math::ibetac
|
||||
#define IBETA_INV_FUNCTION_TO_TEST boost::math::ibeta_inv
|
||||
#define IBETAC_INV_FUNCTION_TO_TEST boost::math::ibetac_inv
|
||||
#define IBETA_INVA_FUNCTION_TO_TEST boost::math::ibeta_inva
|
||||
#define IBETAC_INVA_FUNCTION_TO_TEST boost::math::ibetac_inva
|
||||
#define IBETA_INVB_FUNCTION_TO_TEST boost::math::ibeta_invb
|
||||
#define IBETAC_INVB_FUNCTION_TO_TEST boost::math::ibetac_invb
|
||||
|
||||
#define IGAMMA_FUNCTION_TO_TEST boost::math::tgamma
|
||||
#define IGAMMAL_FUNCTION_TO_TEST boost::math::tgamma_lower
|
||||
#define GAMMAP_FUNCTION_TO_TEST boost::math::gamma_p
|
||||
#define GAMMAQ_FUNCTION_TO_TEST boost::math::gamma_q
|
||||
#define GAMMAP_INV_FUNCTION_TO_TEST boost::math::gamma_p_inv
|
||||
#define GAMMAQ_INV_FUNCTION_TO_TEST boost::math::gamma_q_inv
|
||||
#define GAMMAP_INVA_FUNCTION_TO_TEST boost::math::gamma_p_inva
|
||||
#define GAMMAQ_INVA_FUNCTION_TO_TEST boost::math::gamma_q_inva
|
||||
|
||||
#define SN_FUNCTION_TO_TEST boost::math::jacobi_sn
|
||||
#define CN_FUNCTION_TO_TEST boost::math::jacobi_cn
|
||||
#define DN_FUNCTION_TO_TEST boost::math::jacobi_dn
|
||||
#define JACOBI_ZETA_FUNCTION_TO_TEST boost::math::jacobi_zeta
|
||||
|
||||
#define LAGUERRE_FUNCTION_TO_TEST boost::math::laguerre
|
||||
#define ASSOC_LAGUERRE_FUNCTION_TO_TEST boost::math::laguerre
|
||||
|
||||
#define LEGENDRE_P_FUNCTION_TO_TEST boost::math::legendre_p
|
||||
#define LEGENDRE_Q_FUNCTION_TO_TEST boost::math::legendre_q
|
||||
#define LEGENDRE_PA_FUNCTION_TO_TEST boost::math::legendre_p
|
||||
|
||||
#define POLYGAMMA_FUNCTION_TO_TEST boost::math::polygamma
|
||||
#define TGAMMA_RATIO_FUNCTION_TO_TEST boost::math::tgamma_ratio
|
||||
#define TGAMMA_DELTA_RATIO_FUNCTION_TO_TEST boost::math::tgamma_delta_ratio
|
||||
#define SIN_PI_RATIO_FUNCTION_TO_TEST boost::math::sin_pi
|
||||
#define COS_PI_RATIO_FUNCTION_TO_TEST boost::math::cos_pi
|
||||
#define TRIGAMMA_RATIO_FUNCTION_TO_TEST boost::math::trigamma
|
||||
#define ZETA_FUNCTION_TO_TEST boost::math::zeta
|
||||
|
||||
#define SQRT1PM1_FUNCTION_TO_TEST boost::math::sqrt1pm1
|
||||
#define POWM1_FUNCTION_TO_TEST boost::math::powm1
|
||||
#define OWENS_T_FUNCTION_TO_TEST boost::math::owens_t
|
||||
#define SPHERICAL_HARMONIC_R_FUNCTION_TO_TEST boost::math::spherical_harmonic_r
|
||||
#define SPHERICAL_HARMONIC_I_FUNCTION_TO_TEST boost::math::spherical_harmonic_i
|
||||
|
||||
template <class T> T do_nc_beta_cdf(T a, T b, T nc, T x){ return cdf(boost::math::non_central_beta_distribution<T>(a, b, nc), x); }
|
||||
template <class T> T do_nc_beta_ccdf(T a, T b, T nc, T x){ return cdf(complement(boost::math::non_central_beta_distribution<T>(a, b, nc), x)); }
|
||||
template <class T> T do_nc_chi_squared_cdf(T df, T nc, T x){ return cdf(boost::math::non_central_chi_squared_distribution<T>(df, nc), x); }
|
||||
template <class T> T do_nc_chi_squared_ccdf(T df, T nc, T x){ return cdf(complement(boost::math::non_central_chi_squared_distribution<T>(df, nc), x)); }
|
||||
template <class T> T do_nc_t_cdf(T df, T nc, T x){ return cdf(boost::math::non_central_t_distribution<T>(df, nc), x); }
|
||||
template <class T> T do_nc_t_ccdf(T df, T nc, T x){ return cdf(complement(boost::math::non_central_t_distribution<T>(df, nc), x)); }
|
||||
|
||||
#define NC_BETA_CDF_FUNCTION_TO_TEST do_nc_beta_cdf
|
||||
#define NC_BETA_CCDF_FUNCTION_TO_TEST do_nc_beta_ccdf
|
||||
#define NC_CHI_SQUARED_CDF_FUNCTION_TO_TEST do_nc_chi_squared_cdf
|
||||
#define NC_CHI_SQUARED_CCDF_FUNCTION_TO_TEST do_nc_chi_squared_ccdf
|
||||
#define NC_T_CDF_FUNCTION_TO_TEST do_nc_t_cdf
|
||||
#define NC_T_CCDF_FUNCTION_TO_TEST do_nc_t_ccdf
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(TYPE_TO_TEST) && !defined(NAME_OF_TYPE_TO_TEST)
|
||||
#define NAME_OF_TYPE_TO_TEST BOOST_STRINGIZE(TYPE_TO_TEST)
|
||||
#endif
|
||||
|
||||
//
|
||||
// This include has to come at the end after all the setup is done:
|
||||
//
|
||||
#include "handle_test_result.hpp"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,33 @@
|
||||
[article Special Function Error Rates Report
|
||||
[quickbook 1.6]
|
||||
[/purpose ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22]
|
||||
[license
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
[@http://www.boost.org/LICENSE_1_0.txt])
|
||||
]
|
||||
]
|
||||
|
||||
[import accuracy_tables.qbk]
|
||||
[import ../../../doc/html4_symbols.qbk]
|
||||
|
||||
[all_sections]
|
||||
|
||||
[section:error_logs Error Logs]
|
||||
|
||||
[all_errors]
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:all_the_tables Tables]
|
||||
|
||||
[all_tables]
|
||||
|
||||
[endsect]
|
||||
|
||||
[/
|
||||
Copyright 2015 John Maddock and Paul A. Bristow.
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt).
|
||||
]
|
||||
@@ -0,0 +1,515 @@
|
||||
// (C) Copyright John Maddock 2006-7.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MATH_HANDLE_TEST_RESULT
|
||||
#define BOOST_MATH_HANDLE_TEST_RESULT
|
||||
|
||||
#include <boost/math/tools/stats.hpp>
|
||||
#include <boost/math/tools/precision.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/interprocess/sync/named_mutex.hpp>
|
||||
#include <boost/interprocess/sync/scoped_lock.hpp>
|
||||
#include <boost/math/special_functions/fpclassify.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
#include <boost/math/tools/test.hpp>
|
||||
|
||||
inline std::string sanitize_string(const std::string& s)
|
||||
{
|
||||
static const boost::regex e("[^a-zA-Z0-9]+");
|
||||
return boost::regex_replace(s, e, "_");
|
||||
}
|
||||
|
||||
static std::string content;
|
||||
boost::filesystem::path path_to_content;
|
||||
|
||||
struct content_loader
|
||||
{
|
||||
boost::interprocess::named_mutex mu;
|
||||
boost::interprocess::scoped_lock<boost::interprocess::named_mutex> lock;
|
||||
content_loader() : mu(boost::interprocess::open_or_create, "handle_test_result"), lock(mu)
|
||||
{
|
||||
boost::filesystem::path p(__FILE__);
|
||||
p = p.parent_path();
|
||||
p /= "doc";
|
||||
p /= "accuracy_tables.qbk";
|
||||
path_to_content = p;
|
||||
if(boost::filesystem::exists(p))
|
||||
{
|
||||
boost::filesystem::ifstream is(p);
|
||||
if(is.good())
|
||||
{
|
||||
do
|
||||
{
|
||||
char c = static_cast<char>(is.get());
|
||||
if(c != EOF)
|
||||
content.append(1, c);
|
||||
} while(is.good());
|
||||
}
|
||||
}
|
||||
}
|
||||
~content_loader()
|
||||
{
|
||||
boost::filesystem::ofstream os(path_to_content);
|
||||
os << content;
|
||||
}
|
||||
void instantiate()const
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
static const content_loader loader;
|
||||
|
||||
void load_table(std::vector<std::vector<std::string> >& table, std::string::const_iterator begin, std::string::const_iterator end)
|
||||
{
|
||||
static const boost::regex item_e(
|
||||
"\\["
|
||||
"([^\\[\\]]*(?0)?)*"
|
||||
"\\]"
|
||||
);
|
||||
|
||||
boost::regex_token_iterator<std::string::const_iterator> i(begin, end, item_e), j;
|
||||
|
||||
while(i != j)
|
||||
{
|
||||
// Add a row:
|
||||
table.push_back(std::vector<std::string>());
|
||||
boost::regex_token_iterator<std::string::const_iterator> k(i->first + 1, i->second - 1, item_e);
|
||||
while(k != j)
|
||||
{
|
||||
// Add a cell:
|
||||
table.back().push_back(std::string(k->first + 1, k->second - 1));
|
||||
++k;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
std::string save_table(std::vector<std::vector<std::string> >& table)
|
||||
{
|
||||
std::string result;
|
||||
|
||||
for(std::vector<std::vector<std::string> >::const_iterator i = table.begin(), j = table.end(); i != j; ++i)
|
||||
{
|
||||
result += "[";
|
||||
for(std::vector<std::string>::const_iterator k = i->begin(), l = i->end(); k != l; ++k)
|
||||
{
|
||||
result += "[";
|
||||
result += *k;
|
||||
result += "]";
|
||||
}
|
||||
result += "]\n";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void add_to_all_sections(const std::string& id, std::string list_name = "all_sections")
|
||||
{
|
||||
std::string::size_type pos = content.find("[template " + list_name + "[]"), end_pos;
|
||||
if(pos == std::string::npos)
|
||||
{
|
||||
//
|
||||
// Just append to the end:
|
||||
//
|
||||
content.append("\n[template ").append(list_name).append("[]\n[").append(id).append("]\n]\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Read in the all list of sections, add our new one (in alphabetical order),
|
||||
// and then rewrite the whole thing:
|
||||
//
|
||||
static const boost::regex item_e(
|
||||
"\\["
|
||||
"([^\\[\\]]*(?0)?)*"
|
||||
"\\]|\\]"
|
||||
);
|
||||
boost::regex_token_iterator<std::string::const_iterator> i(content.begin() + pos + 12 + list_name.size(), content.end(), item_e), j;
|
||||
std::set<std::string> sections;
|
||||
while(i != j)
|
||||
{
|
||||
if(i->length() == 1)
|
||||
{
|
||||
end_pos = i->first - content.begin();
|
||||
break;
|
||||
}
|
||||
sections.insert(std::string(i->first + 1, i->second - 1));
|
||||
++i;
|
||||
}
|
||||
sections.insert(id);
|
||||
std::string new_list = "\n";
|
||||
for(std::set<std::string>::const_iterator sec = sections.begin(); sec != sections.end(); ++sec)
|
||||
{
|
||||
new_list += "[" + *sec + "]\n";
|
||||
}
|
||||
content.replace(pos + 12 + list_name.size(), end_pos - pos - 12 - list_name.size(), new_list);
|
||||
}
|
||||
}
|
||||
|
||||
void add_cell(const std::string& cell_name, const std::string& table_name, const std::string& row_name, const std::string& type_name)
|
||||
{
|
||||
//
|
||||
// Load the table, add our data, and re-write:
|
||||
//
|
||||
std::string table_id = "table_" + sanitize_string(table_name);
|
||||
std::string column_heading = BOOST_COMPILER;
|
||||
column_heading += "[br]";
|
||||
column_heading += BOOST_PLATFORM;
|
||||
column_heading += "[br]";
|
||||
column_heading += type_name;
|
||||
boost::regex table_e("\\[table:" + table_id
|
||||
+ "\\s[^\\[]+"
|
||||
"((\\["
|
||||
"([^\\[\\]]*(?2)?)*"
|
||||
"\\]\\s*)*\\s*)"
|
||||
"\\]"
|
||||
);
|
||||
|
||||
boost::smatch table_location;
|
||||
if(regex_search(content, table_location, table_e))
|
||||
{
|
||||
std::vector<std::vector<std::string> > table_data;
|
||||
load_table(table_data, table_location[1].first, table_location[1].second);
|
||||
//
|
||||
// Figure out which column we're on:
|
||||
//
|
||||
unsigned column_id = 1001u;
|
||||
for(unsigned i = 0; i < table_data[0].size(); ++i)
|
||||
{
|
||||
if(table_data[0][i] == column_heading)
|
||||
{
|
||||
column_id = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(column_id > 1000)
|
||||
{
|
||||
//
|
||||
// Need a new column, must be adding a new compiler to the table!
|
||||
//
|
||||
table_data[0].push_back(column_heading);
|
||||
for(unsigned i = 1; i < table_data.size(); ++i)
|
||||
table_data[i].push_back(std::string());
|
||||
column_id = table_data[0].size() - 1;
|
||||
}
|
||||
//
|
||||
// Figure out the row:
|
||||
//
|
||||
unsigned row_id = 1001;
|
||||
for(unsigned i = 1; i < table_data.size(); ++i)
|
||||
{
|
||||
if(table_data[i][0] == row_name)
|
||||
{
|
||||
row_id = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(row_id > 1000)
|
||||
{
|
||||
//
|
||||
// Need a new row, add it now:
|
||||
//
|
||||
table_data.push_back(std::vector<std::string>());
|
||||
table_data.back().push_back(row_name);
|
||||
for(unsigned i = 1; i < table_data[0].size(); ++i)
|
||||
table_data.back().push_back(std::string());
|
||||
row_id = table_data.size() - 1;
|
||||
}
|
||||
//
|
||||
// Update the entry:
|
||||
//
|
||||
std::string& s = table_data[row_id][column_id];
|
||||
if(s.empty())
|
||||
{
|
||||
std::cout << "Adding " << cell_name << " to empty cell.";
|
||||
s = "[" + cell_name + "]";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(cell_name.find("_boost_") != std::string::npos)
|
||||
{
|
||||
std::cout << "Adding " << cell_name << " to start of cell.";
|
||||
s.insert(0, "[" + cell_name + "][br][br]");
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Adding " << cell_name << " to end of cell.";
|
||||
if((s.find("_boost_") != std::string::npos) && (s.find("[br]") == std::string::npos))
|
||||
s += "[br]"; // extra break if we're adding directly after the boost results.
|
||||
s += "[br][" + cell_name + "]";
|
||||
}
|
||||
}
|
||||
//
|
||||
// Convert back to a string and insert into content:
|
||||
std::string c = save_table(table_data);
|
||||
content.replace(table_location.position(1), table_location.length(1), c);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Create a new table and try again:
|
||||
//
|
||||
std::string new_table = "\n[template " + table_id;
|
||||
new_table += "[]\n[table:" + table_id;
|
||||
new_table += " Error rates for ";
|
||||
new_table += table_name;
|
||||
new_table += "\n[[][";
|
||||
new_table += column_heading;
|
||||
new_table += "]]\n";
|
||||
new_table += "[[";
|
||||
new_table += row_name;
|
||||
new_table += "][[";
|
||||
new_table += cell_name;
|
||||
new_table += "]]]\n]\n]\n";
|
||||
|
||||
std::string::size_type pos = content.find("[/tables:]");
|
||||
if(pos != std::string::npos)
|
||||
content.insert(pos + 10, new_table);
|
||||
else
|
||||
content += "\n\n[/tables:]\n" + new_table;
|
||||
//
|
||||
// Add a section for this table as well:
|
||||
//
|
||||
std::string section_id = "section_" + sanitize_string(table_name);
|
||||
if(content.find(section_id + "[]") == std::string::npos)
|
||||
{
|
||||
std::string new_section = "\n[template " + section_id + "[]\n[section:" + section_id + " " + table_name + "]\n[" + table_id + "]\n[endsect]\n]\n";
|
||||
pos = content.find("[/sections:]");
|
||||
if(pos != std::string::npos)
|
||||
content.insert(pos + 12, new_section);
|
||||
else
|
||||
content += "\n\n[/sections:]\n" + new_section;
|
||||
add_to_all_sections(section_id);
|
||||
}
|
||||
//
|
||||
// Add to list of all tables (not in sections):
|
||||
//
|
||||
add_to_all_sections(table_id, "all_tables");
|
||||
}
|
||||
}
|
||||
|
||||
void set_result(const std::string& cell_name, const std::string& cell_content, const std::string& table_name, const std::string& row_name, const std::string& type_name)
|
||||
{
|
||||
loader.instantiate();
|
||||
const boost::regex e("\\[template\\s+" + cell_name +
|
||||
"\\[\\]([^\\n]*)\\]$");
|
||||
|
||||
boost::smatch what;
|
||||
if(regex_search(content, what, e))
|
||||
{
|
||||
content.replace(what.position(1), what.length(1), cell_content);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Need to add new content:
|
||||
std::string::size_type pos = content.find("[/Cell Content:]");
|
||||
std::string t = "\n[template " + cell_name + "[] " + cell_content + "]";
|
||||
if(pos != std::string::npos)
|
||||
content.insert(pos + 16, t);
|
||||
else
|
||||
{
|
||||
content.insert(0, t);
|
||||
content.insert(0, "[/Cell Content:]");
|
||||
}
|
||||
}
|
||||
//
|
||||
// Check to verify that our content is actually used somewhere,
|
||||
// if not we need to create a place for it:
|
||||
//
|
||||
if(content.find("[" + cell_name + "]") == std::string::npos)
|
||||
add_cell(cell_name, table_name, row_name, type_name);
|
||||
}
|
||||
|
||||
void set_error_content(const std::string& id, const std::string& error_s)
|
||||
{
|
||||
boost::regex content_e("\\[template\\s+" + id +
|
||||
"\\[\\]\\s+"
|
||||
"("
|
||||
"[^\\]\\[]*"
|
||||
"(?:"
|
||||
"\\["
|
||||
"([^\\[\\]]*(?2)?)*"
|
||||
"\\]"
|
||||
"[^\\]\\[]*"
|
||||
")*"
|
||||
|
||||
")"
|
||||
"\\]");
|
||||
boost::smatch what;
|
||||
if(regex_search(content, what, content_e))
|
||||
{
|
||||
// replace existing content:
|
||||
content.replace(what.position(1), what.length(1), error_s);
|
||||
}
|
||||
else
|
||||
{
|
||||
// add new content:
|
||||
std::string::size_type pos = content.find("[/error_content:]");
|
||||
if(pos != std::string::npos)
|
||||
{
|
||||
content.insert(pos + 17, "\n[template " + id + "[]\n" + error_s + "\n]\n");
|
||||
}
|
||||
else
|
||||
content.append("\n[/error_content:]\n[template " + id + "[]\n" + error_s + "\n]\n");
|
||||
}
|
||||
//
|
||||
// Add to all_errors if not already there:
|
||||
//
|
||||
if(content.find("[" + id + "]") == std::string::npos)
|
||||
{
|
||||
// Find all_errors template:
|
||||
std::string::size_type pos = content.find("[template all_errors[]\n");
|
||||
if(pos != std::string::npos)
|
||||
{
|
||||
content.insert(pos + 23, "[" + id + "]\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
content.append("\n[template all_errors[]\n[").append(id).append("]\n]\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void remove_error_content(const std::string& error_id)
|
||||
{
|
||||
// remove use template first:
|
||||
std::string::size_type pos = content.find("[" + error_id + "]");
|
||||
if(pos != std::string::npos)
|
||||
{
|
||||
content.erase(pos, 2 + error_id.size());
|
||||
}
|
||||
// then the template define itself:
|
||||
boost::regex content_e("\\[template\\s+" + error_id +
|
||||
"\\[\\]\\s+"
|
||||
"("
|
||||
"[^\\]\\[]*"
|
||||
"(?:"
|
||||
"\\["
|
||||
"([^\\[\\]]*(?2)?)*"
|
||||
"\\]"
|
||||
"[^\\]\\[]*"
|
||||
")*"
|
||||
")"
|
||||
"\\]");
|
||||
boost::smatch what;
|
||||
if(regex_search(content, what, content_e))
|
||||
{
|
||||
content.erase(what.position(), what.length());
|
||||
}
|
||||
}
|
||||
|
||||
template <class T, class Seq>
|
||||
void handle_test_result(const boost::math::tools::test_result<T>& result,
|
||||
const Seq& worst, int row,
|
||||
const char* type_name,
|
||||
const char* test_name,
|
||||
const char* group_name)
|
||||
{
|
||||
T eps = boost::math::tools::epsilon<T>();
|
||||
T max_error_found = (result.max)() / eps;
|
||||
T mean_error_found = result.rms() / eps;
|
||||
|
||||
std::string cell_name = sanitize_string(BOOST_COMPILER) + "_" + sanitize_string(BOOST_PLATFORM) + "_" + sanitize_string(type_name)
|
||||
+ "_" + sanitize_string(test_name) + "_" + sanitize_string(TEST_LIBRARY_NAME) + "_" + sanitize_string(group_name);
|
||||
|
||||
std::stringstream ss;
|
||||
ss << std::setprecision(3);
|
||||
if(std::string(TEST_LIBRARY_NAME) != "boost")
|
||||
ss << "(['" << TEST_LIBRARY_NAME << ":] ";
|
||||
else
|
||||
ss << "[role blue ";
|
||||
|
||||
if((result.max)() > std::sqrt(eps))
|
||||
ss << "[role red ";
|
||||
|
||||
|
||||
ss << "Max = ";
|
||||
if((boost::math::isfinite)(max_error_found))
|
||||
ss << max_error_found;
|
||||
else
|
||||
ss << "+INF";
|
||||
ss << "[epsilon] (Mean = ";
|
||||
if((boost::math::isfinite)(mean_error_found))
|
||||
ss << mean_error_found;
|
||||
else
|
||||
ss << "+INF";
|
||||
ss << "[epsilon])";
|
||||
|
||||
//
|
||||
// Now check for error output from gross errors or unexpected exceptions:
|
||||
//
|
||||
std::stringbuf* pbuf = dynamic_cast<std::stringbuf*>(std::cerr.rdbuf());
|
||||
bool have_errors = false;
|
||||
std::string error_id = "errors_" + cell_name;
|
||||
if(pbuf)
|
||||
{
|
||||
std::string err_s = pbuf->str();
|
||||
if(err_s.size())
|
||||
{
|
||||
if(err_s.size() > 4096)
|
||||
{
|
||||
std::string::size_type pos = err_s.find("\n", 4096);
|
||||
if(pos != std::string::npos)
|
||||
{
|
||||
err_s.erase(pos);
|
||||
err_s += "\n*** FURTHER CONTENT HAS BEEN TRUNCATED FOR BREVITY ***\n";
|
||||
}
|
||||
}
|
||||
std::string::size_type pos = err_s.find("\n");
|
||||
while(pos != std::string::npos)
|
||||
{
|
||||
err_s.replace(pos, 1, "[br]");
|
||||
pos = err_s.find("\n");
|
||||
}
|
||||
err_s = "[h4 Error Output For " + std::string(test_name) + std::string(" with compiler ") + std::string(BOOST_COMPILER)
|
||||
+ std::string(" and library ") + std::string(TEST_LIBRARY_NAME) + " and test data "
|
||||
+ std::string(group_name) + "]\n\n[#" + error_id + "]\n" + err_s + std::string("\n\n\n");
|
||||
ss << " [link " << error_id << " And other failures.]";
|
||||
pbuf->str("");
|
||||
set_error_content(error_id, err_s);
|
||||
have_errors = true;
|
||||
}
|
||||
}
|
||||
if(!have_errors)
|
||||
remove_error_content(error_id);
|
||||
|
||||
|
||||
if(std::string(TEST_LIBRARY_NAME) != "boost")
|
||||
ss << ")";
|
||||
else
|
||||
ss << "]";
|
||||
|
||||
if((result.max)() > std::sqrt(eps))
|
||||
ss << "]";
|
||||
|
||||
std::string cell_content = ss.str();
|
||||
|
||||
set_result(cell_name, cell_content, test_name, group_name, type_name);
|
||||
}
|
||||
|
||||
struct error_stream_replacer
|
||||
{
|
||||
std::streambuf* old_buf;
|
||||
std::stringstream ss;
|
||||
error_stream_replacer()
|
||||
{
|
||||
old_buf = std::cerr.rdbuf();
|
||||
std::cerr.rdbuf(ss.rdbuf());
|
||||
}
|
||||
~error_stream_replacer()
|
||||
{
|
||||
std::cerr.rdbuf(old_buf);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BOOST_MATH_HANDLE_TEST_RESULT
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// Copyright John Maddock 2015.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <math.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
long double d = 1;
|
||||
|
||||
d = ::erf(d);
|
||||
d = ::erfc(d);
|
||||
d = ::tgamma(d);
|
||||
d = ::lgamma(d);
|
||||
return d != 0 ? 0 : 1;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// Copyright John Maddock 2015.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <gsl/gsl_sf.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
double d = gsl_sf_bessel_Jn(2, 1.0);
|
||||
return d != 0 ? 0 : 1;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// Copyright John Maddock 2015.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <tr1/cmath>
|
||||
|
||||
int main()
|
||||
{
|
||||
long double d = 1;
|
||||
|
||||
d = std::tr1::erf(d);
|
||||
d = std::tr1::erfc(d);
|
||||
d = std::tr1::tgamma(d);
|
||||
d = std::tr1::lgamma(d);
|
||||
return d != 0 ? 0 : 1;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright John Maddock 2015.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define MATHLIB_STANDALONE
|
||||
#include <Rmath.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
double d = psigamma(2.0, 4);
|
||||
return d != 0 ? 0 : 1;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_bessel_i.hpp"
|
||||
#include <boost/math/special_functions/bessel.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_bessel(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_bessel(0.0f, "float");
|
||||
if(test_double)
|
||||
test_bessel(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_bessel(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_bessel(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_bessel_i_prime.hpp"
|
||||
#include <boost/math/special_functions/bessel_prime.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_bessel(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_bessel(0.0f, "float");
|
||||
if(test_double)
|
||||
test_bessel(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_bessel(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_bessel(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_bessel_j.hpp"
|
||||
#include <boost/math/special_functions/bessel.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_bessel(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_bessel(0.0f, "float");
|
||||
if(test_double)
|
||||
test_bessel(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_bessel(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_bessel(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_bessel_j_prime.hpp"
|
||||
#include <boost/math/special_functions/bessel_prime.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_bessel_prime(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_bessel_prime(0.0f, "float");
|
||||
if(test_double)
|
||||
test_bessel_prime(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_bessel_prime(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_bessel_prime(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_bessel_k.hpp"
|
||||
#include <boost/math/special_functions/bessel.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_bessel(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_bessel(0.0f, "float");
|
||||
if(test_double)
|
||||
test_bessel(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_bessel(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_bessel(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_bessel_k_prime.hpp"
|
||||
#include <boost/math/special_functions/bessel_prime.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_bessel(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_bessel(0.0f, "float");
|
||||
if(test_double)
|
||||
test_bessel(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_bessel(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_bessel(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_bessel_y.hpp"
|
||||
#include <boost/math/special_functions/bessel.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_bessel(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_bessel(0.0f, "float");
|
||||
if(test_double)
|
||||
test_bessel(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_bessel(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_bessel(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_bessel_y_prime.hpp"
|
||||
#include <boost/math/special_functions/bessel_prime.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_bessel_prime(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_bessel_prime(0.0f, "float");
|
||||
if(test_double)
|
||||
test_bessel_prime(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_bessel_prime(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_bessel_prime(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_beta.hpp"
|
||||
#include <boost/math/special_functions/beta.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_beta(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_beta(0.0f, "float");
|
||||
if(test_double)
|
||||
test_beta(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_beta(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_beta(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_binomial_coeff.hpp"
|
||||
#include <boost/math/special_functions/binomial.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_binomial(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_binomial(0.0f, "float");
|
||||
if(test_double)
|
||||
test_binomial(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_binomial(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_binomial(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_carlson.hpp"
|
||||
#include <boost/math/special_functions/ellint_rc.hpp>
|
||||
#include <boost/math/special_functions/ellint_rg.hpp>
|
||||
#include <boost/math/special_functions/ellint_rf.hpp>
|
||||
#include <boost/math/special_functions/ellint_rd.hpp>
|
||||
#include <boost/math/special_functions/ellint_rj.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_spots(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_spots(0.0f, "float");
|
||||
if(test_double)
|
||||
test_spots(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_spots(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_spots(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
// Copyright John Maddock 2015.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning (disable : 4224)
|
||||
#endif
|
||||
|
||||
#include <boost/math/special_functions/cbrt.hpp>
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_cbrt.hpp"
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_cbrt(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_cbrt(0.0f, "float");
|
||||
if(test_double)
|
||||
test_cbrt(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_cbrt(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_cbrt(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_digamma.hpp"
|
||||
#include <boost/math/special_functions/digamma.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_digamma(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_digamma(0.0f, "float");
|
||||
if(test_double)
|
||||
test_digamma(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_digamma(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_digamma(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_ellint_1.hpp"
|
||||
#include <boost/math/special_functions/ellint_1.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_spots(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_spots(0.0f, "float");
|
||||
if(test_double)
|
||||
test_spots(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_spots(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_spots(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_ellint_2.hpp"
|
||||
#include <boost/math/special_functions/ellint_2.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_spots(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_spots(0.0f, "float");
|
||||
if(test_double)
|
||||
test_spots(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_spots(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_spots(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_ellint_3.hpp"
|
||||
#include <boost/math/special_functions/ellint_3.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_spots(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_spots(0.0f, "float");
|
||||
if(test_double)
|
||||
test_spots(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_spots(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_spots(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_ellint_d.hpp"
|
||||
#include <boost/math/special_functions/ellint_d.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_spots(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_spots(0.0f, "float");
|
||||
if(test_double)
|
||||
test_spots(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_spots(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_spots(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/math/special_functions/erf.hpp>
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_erf.hpp"
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_erf(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_erf(0.0f, "float");
|
||||
if(test_double)
|
||||
test_erf(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_erf(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_erf(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_expint.hpp"
|
||||
#include <boost/math/special_functions/expint.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_expint(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_expint(0.0f, "float");
|
||||
if(test_double)
|
||||
test_expint(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_expint(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_expint(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
// Copyright John Maddock 2015.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning (disable : 4224)
|
||||
#endif
|
||||
|
||||
#include <boost/math/special_functions/gamma.hpp>
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_gamma.hpp"
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_gamma(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_gamma(0.0f, "float");
|
||||
if(test_double)
|
||||
test_gamma(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_gamma(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_cbrt(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_hermite.hpp"
|
||||
#include <boost/math/special_functions/hermite.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_hermite(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_hermite(0.0f, "float");
|
||||
if(test_double)
|
||||
test_hermite(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_hermite(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_hermite(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_heuman_lambda.hpp"
|
||||
#include <boost/math/special_functions/heuman_lambda.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_spots(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_spots(0.0f, "float");
|
||||
if(test_double)
|
||||
test_spots(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_spots(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_spots(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_ibeta.hpp"
|
||||
#include <boost/math/special_functions/beta.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_beta(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_beta(0.0f, "float");
|
||||
if(test_double)
|
||||
test_beta(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_beta(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_beta(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_ibeta_inv.hpp"
|
||||
#include <boost/math/special_functions/beta.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_beta(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_beta(0.0f, "float");
|
||||
if(test_double)
|
||||
test_beta(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_beta(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_beta(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_ibeta_inv_ab.hpp"
|
||||
#include <boost/math/special_functions/beta.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_beta(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_beta(0.0f, "float");
|
||||
if(test_double)
|
||||
test_beta(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_beta(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_beta(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_igamma.hpp"
|
||||
#include <boost/math/special_functions/gamma.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_gamma(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_gamma(0.0f, "float");
|
||||
if(test_double)
|
||||
test_gamma(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_gamma(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_gamma(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_igamma_inv.hpp"
|
||||
#include <boost/math/special_functions/gamma.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_gamma(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_gamma(0.0f, "float");
|
||||
if(test_double)
|
||||
test_gamma(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_gamma(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_gamma(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_igamma_inva.hpp"
|
||||
#include <boost/math/special_functions/gamma.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_gamma(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_gamma(0.0f, "float");
|
||||
if(test_double)
|
||||
test_gamma(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_gamma(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_gamma(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_jacobi.hpp"
|
||||
#include <boost/math/special_functions/jacobi_elliptic.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_spots(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_spots(0.0f, "float");
|
||||
if(test_double)
|
||||
test_spots(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_spots(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_spots(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_jacobi_zeta.hpp"
|
||||
#include <boost/math/special_functions/jacobi_zeta.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_spots(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_spots(0.0f, "float");
|
||||
if(test_double)
|
||||
test_spots(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_spots(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_spots(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_laguerre.hpp"
|
||||
#include <boost/math/special_functions/laguerre.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_laguerre(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_laguerre(0.0f, "float");
|
||||
if(test_double)
|
||||
test_laguerre(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_laguerre(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_laguerre(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_legendre.hpp"
|
||||
#include <boost/math/special_functions/legendre.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_legendre_p(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_legendre_p(0.0f, "float");
|
||||
if(test_double)
|
||||
test_legendre_p(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_legendre_p(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_legendre_p(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/log1p_expm1_test.hpp"
|
||||
#include <boost/math/special_functions/expm1.hpp>
|
||||
#include <boost/math/special_functions/log1p.hpp>
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test(0.0f, "float");
|
||||
if(test_double)
|
||||
test(0.0, "double");
|
||||
if(test_long_double)
|
||||
test(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_nc_beta.hpp"
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_accuracy(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_accuracy(0.0f, "float");
|
||||
if(test_double)
|
||||
test_accuracy(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_accuracy(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_accuracy(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_nc_chi_squared.hpp"
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_accuracy(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_accuracy(0.0f, "float");
|
||||
if(test_double)
|
||||
test_accuracy(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_accuracy(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_accuracy(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_nc_t.hpp"
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_accuracy(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_accuracy(0.0f, "float");
|
||||
if(test_double)
|
||||
test_accuracy(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_accuracy(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_accuracy(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_owens_t.hpp"
|
||||
#include <boost/math/special_functions/owens_t.hpp> // for owens_t function.
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_owens_t(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_owens_t(0.0f, "float");
|
||||
if(test_double)
|
||||
test_owens_t(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_owens_t(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_owens_t(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_polygamma.hpp"
|
||||
#include <boost/math/special_functions/polygamma.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_polygamma(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_polygamma(0.0f, "float");
|
||||
if(test_double)
|
||||
test_polygamma(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_polygamma(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_polygamma(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/powm1_sqrtp1m1_test.hpp"
|
||||
#include <boost/math/special_functions/powm1.hpp>
|
||||
#include <boost/math/special_functions/sqrt1pm1.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_powm1_sqrtp1m1(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_powm1_sqrtp1m1(0.0f, "float");
|
||||
if(test_double)
|
||||
test_powm1_sqrtp1m1(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_powm1_sqrtp1m1(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_powm1_sqrtp1m1(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_spherical_harmonic.hpp"
|
||||
#include <boost/math/special_functions/spherical_harmonic.hpp>
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_spherical_harmonic(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_spherical_harmonic(0.0f, "float");
|
||||
if(test_double)
|
||||
test_spherical_harmonic(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_spherical_harmonic(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_spherical_harmonic(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_tgamma_ratio.hpp"
|
||||
#include <boost/math/special_functions/gamma.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_tgamma_ratio(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_tgamma_ratio(0.0f, "float");
|
||||
if(test_double)
|
||||
test_tgamma_ratio(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_tgamma_ratio(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_tgamma_ratio(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_trig.hpp"
|
||||
#include <boost/math/special_functions/sin_pi.hpp>
|
||||
#include <boost/math/special_functions/cos_pi.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_trig(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_trig(0.0f, "float");
|
||||
if(test_double)
|
||||
test_trig(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_trig(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_trig(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_trigamma.hpp"
|
||||
#include <boost/math/special_functions/trigamma.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_trigamma(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_trigamma(0.0f, "float");
|
||||
if(test_double)
|
||||
test_trigamma(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_trigamma(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_trigamma(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright John Maddock 2006-15.
|
||||
// Copyright Paul A. Bristow 2007
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_zeta.hpp"
|
||||
#include <boost/math/special_functions/zeta.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(test_main, 10000);
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main)
|
||||
{
|
||||
BOOST_MATH_CONTROL_FP;
|
||||
|
||||
error_stream_replacer rep;
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_zeta(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
bool test_double = false;
|
||||
bool test_long_double = false;
|
||||
|
||||
if(std::numeric_limits<long double>::digits == std::numeric_limits<double>::digits)
|
||||
{
|
||||
//
|
||||
// Don't bother with long double, it's the same as double:
|
||||
//
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
test_double = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(BOOST_MATH_PROMOTE_FLOAT_POLICY == false)
|
||||
test_float = true;
|
||||
if(BOOST_MATH_PROMOTE_DOUBLE_POLICY == false)
|
||||
test_double = true;
|
||||
test_long_double = true;
|
||||
}
|
||||
|
||||
#ifdef ALWAYS_TEST_DOUBLE
|
||||
test_double = true;
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_zeta(0.0f, "float");
|
||||
if(test_double)
|
||||
test_zeta(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_zeta(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_zeta(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
Place the source for the Cephes double precision library here if you want bjam to
|
||||
build and test it when reporting accuracy results.
|
||||
|
||||
Copyright 2015 John Maddock and Paul A. Bristow.
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt).
|
||||
Reference in New Issue
Block a user