11#include <gsl/gsl_sf.h>
23 return ( gsl_sf_clausen(phi) );
28 auto myphi = remainder(phi, 2.0 * M_PI);
29 if (myphi < 0.0) myphi = -myphi;
31 if (myphi==0.0)
return ( gsl_sf_zeta_int(3) );
33 double TMP = 0.0, l_double = 0.0, lfactorial = 1.0, sign = 1.0;
34 for (
int l=2; l<19; l++) {
36 lfactorial *= l_double;
37 if (l%4) { sign = - 1.0; }
else { sign = 1.0; }
38 TMP +=
B[l]*pow(myphi,l_double)/l_double/(l_double + 1.0)/(l_double + 2.0)
41 return ( gsl_sf_zeta_int(3) - myphi*myphi*(3.0/4.0 - log(myphi)/2.0 - TMP) );
double B[19]
the Bernoulli numbers
ClausenFunctions()
The default constructor.
double Cl3(const double phi) const
The Clausen function of index 3, .
double Cl2(const double phi) const
The Clausen function of index 2, .