Go to the documentation of this file.
26 #ifndef O2SCL_POLYLOG_H
27 #define O2SCL_POLYLOG_H
34 #include <gsl/gsl_specfunc.h>
36 #include <o2scl/constants.h>
37 #include <o2scl/err_hnd.h>
38 #include <o2scl/lib_settings.h>
40 #include <o2scl/inte_adapt_cern.h>
41 #include <o2scl/inte_double_exp_boost.h>
43 #ifndef DOXYGEN_NO_O2NS
100 double li3(
double x);
103 double li4(
double x);
106 double li5(
double x);
109 double li6(
double x);
117 #ifndef DOXYGEN_NO_O2NS
155 typedef std::function<fp_t(fp_t)>
func_t;
162 else res=pow(x,a)/(1.0+exp(x-mu));
163 if (!std::isfinite(res)) {
164 std::cout << x <<
" " << a <<
" " << mu <<
" " << x-mu <<
" "
179 void calc_err(fp_t a, fp_t mu, fp_t &res, fp_t &err) {
181 std::bind(std::mem_fn<fp_t(fp_t,fp_t,fp_t)>
183 this,std::placeholders::_1,a,mu);
184 iiu.integ_err(f,res,err);
192 typedef fermi_dirac_integ_tl
193 <inte_iu<
funct,inte_adapt_cern
195 inte_gauss56_coeffs_double>,
198 #if defined(O2SCL_LD_TYPES) || defined(DOXYGEN)
206 1000,
long double>,
long double>,
long double>
238 #if defined(O2SCL_LD_TYPES) || defined(DOXYGEN)
240 #ifdef O2SCL_NEW_BOOST_INTEGRATION
245 class fermion_nr_integ_direct {
252 <
funct_ld,15,
long double>,
long double> it;
256 fermion_nr_integ_direct() {
257 it.iiu.tol_rel=1.0e-18;
262 double calc_1o2(
double y) {
263 long double y2=y, res, err;
264 it.calc_err(0.5L,y2,res,err);
265 return ((
double)res);
270 double calc_m1o2(
double y) {
271 long double y2=y, res, err;
272 it.calc_err(-0.5L,y2,res,err);
273 return ((
double)res);
278 double calc_3o2(
double y) {
279 long double y2=y, res, err;
280 it.calc_err(1.5L,y2,res,err);
281 return ((
double)res);
288 double calc_polylog(
double s,
double y) {
289 long double a=s-1, mu=log(-y), res, err;
290 it.calc_err(a,mu,res,err);
291 return -((double)res);
300 #ifndef DOXYGEN_NO_O2NS
std::function< fp_t(fp_t)> func_t
Internal function type.
double li6(double x)
6-th order polylogarithm
Exp-sinh integration class (Boost)
The main O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl O$_2$scl names...
double calc_1o2(double y)
Fermi-Dirac integral of order .
inte_t iiu
The integrator.
5,6-point Gaussian quadrature (CERNLIB)
fp_t obj_func(fp_t x, fp_t a, fp_t mu)
The Fermi-Dirac function.
fermi_dirac_integ_tl< inte_iu< funct_ld, inte_adapt_cern< funct_ld, inte_gauss56_cern< funct_ld, long double, inte_gauss56_coeffs_long_double >, 1000, long double >, long double >, long double > fermi_dirac_integ_long_double
Long double version of o2scl::fermi_dirac_integ_tl.
double li3(double x)
3-rd order polylogarithm
fermi_dirac_integ_tl< inte_iu< funct, inte_adapt_cern< funct, inte_gauss56_cern< funct, double, inte_gauss56_coeffs_double >, 100, double >, double >, double > fermi_dirac_integ_double
Double-precision version of o2scl::fermi_dirac_integ_tl.
void calc_err(fp_t a, fp_t mu, fp_t &res, fp_t &err)
Compute the integral, storing the result in res and the error in err.
Compute the fermion integrals for a non-relativistic particle using the GSL functions.
Polylogarithms (approximate) .
double li4(double x)
4-th order polylogarithm
std::function< long double(long double)> funct_ld
One-dimensional function typedef in src/base/funct.h.
double calc_m1o2(double y)
Fermi-Dirac integral of order .
double li2(double x)
2-nd order polylogarithm
double li5(double x)
5-th order polylogarithm
Adaptive integration (CERNLIB)
double calc_3o2(double y)
Fermi-Dirac integral of order .
std::function< double(double)> funct
One-dimensional function typedef in src/base/funct.h.
double li0(double x)
0-th order polylogarithm =
double li1(double x)
1-st order polylogarithm =
Integration weights and abcissas for o2scl::inte_gauss56_cern in long double precision.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).