a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
ClausenFunctions Class Reference

A class for the Clausen functions. More...

#include <ClausenFunctions.h>

+ Inheritance diagram for ClausenFunctions:

Detailed Description

A class for the Clausen functions.

Author
HEPfit Collaboration

This class handles the Clausen functions \(\mathrm{Cl}_2(\phi)\) and \(\mathrm{Cl}_3(\phi)\).

Definition at line 22 of file ClausenFunctions.h.

Public Member Functions

double Cl2 (const double phi) const
 The Clausen function of index 2, \(\mathrm{Cl}_2(\phi)\). More...
 
double Cl3 (const double phi) const
 The Clausen function of index 3, \(\mathrm{Cl}_3(\phi)\). More...
 
 ClausenFunctions ()
 The default constructor. More...
 
- Public Member Functions inherited from BernoulliNumbers
 BernoulliNumbers ()
 The default constructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from BernoulliNumbers
double B [19]
 the Bernoulli numbers More...
 

Constructor & Destructor Documentation

◆ ClausenFunctions()

ClausenFunctions::ClausenFunctions ( )

The default constructor.

Definition at line 15 of file ClausenFunctions.cpp.

16{
17}

Member Function Documentation

◆ Cl2()

double ClausenFunctions::Cl2 ( const double  phi) const

The Clausen function of index 2, \(\mathrm{Cl}_2(\phi)\).

This function calls the GSL function gsl_sf_clausen().

Parameters
[in]phia real variable
Returns
\(\mathrm{Cl}_2(\phi)\)

Definition at line 21 of file ClausenFunctions.cpp.

22{
23 return ( gsl_sf_clausen(phi) );
24}

◆ Cl3()

double ClausenFunctions::Cl3 ( const double  phi) const

The Clausen function of index 3, \(\mathrm{Cl}_3(\phi)\).

The function \(\mathrm{Cl}_3(\phi)\) is computed with the help of the GSL function gsl_sf_zeta_int(3). See [Kniehl:1989qu].

Parameters
[in]phia real variable
Returns
\(\mathrm{Cl}_3(\phi) = \zeta(3) - \phi^2 \left( \frac{3}{4} - \frac{\ln(\phi)}{2} + \sum_{n=1}^{\infty} \frac{B_n \phi^{2n}}{2n(2n+1)(2n+2)(2n)!} \right)\)
Note
The function is even, so the argument is internally reduced to the range [0, pi]. The sum is truncated at n=18.
The Bernoulli numbers are stored in the base class BernoulliNumbers.

Definition at line 26 of file ClausenFunctions.cpp.

27{
28 auto myphi = remainder(phi, 2.0 * M_PI); // reduce phi to the range [-pi, pi]
29 if (myphi < 0.0) myphi = -myphi; // Clausen function of third order is even, so we can use the positive value
30
31 if (myphi==0.0) return ( gsl_sf_zeta_int(3) );
32
33 double TMP = 0.0, l_double = 0.0, lfactorial = 1.0, sign = 1.0;
34 for (int l=2; l<19; l++) {
35 l_double = (double)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)
39 /lfactorial * sign;
40 }
41 return ( gsl_sf_zeta_int(3) - myphi*myphi*(3.0/4.0 - log(myphi)/2.0 - TMP) );
42}
double B[19]
the Bernoulli numbers

The documentation for this class was generated from the following files: