Thermal-FIST 1.5
Package for hadron resonance gas model applications
Loading...
Searching...
No Matches
thermalfist::xMath Namespace Reference

Functions

constexpr double Pi ()
 Pi constant.
 
constexpr double GeVtoifm ()
 A constant to transform GeV into fm \(^{-1}\).
 
constexpr double GeVtoifm2 ()
 A constant to transform GeV \(^{2}\) into fm \(^{-2}\).
 
constexpr double GeVtoifm3 ()
 A constant to transform GeV \(^{3}\) into fm \(^{-3}\).
 
constexpr double mnucleon ()
 Nucleon's mass. Value as in UrQMD.
 
constexpr double mpion ()
 Pion's mass. Value as in UrQMD.
 
double BesselI (int n, double x)
 Integer order modified Bessel function I_n(x)
 
double BesselK (int n, double x)
 Integer order modified Bessel function K_n(x)
 
double BesselI0 (double x)
 Modified Bessel function I_0(x)
 
double BesselK0 (double x)
 Modified Bessel function K_0(x)
 
double BesselI1 (double x)
 Modified Bessel function I_1(x)
 
double BesselK1 (double x)
 Modified Bessel function K_1(x)
 
double BesselJ0 (double x)
 Bessel function J0(x) for any real x.
 
double BesselJ1 (double x)
 Bessel function J1(x) for any real x.
 
double BesselY0 (double x)
 Bessel function Y0(x) for positive x.
 
double BesselY1 (double x)
 Bessel function Y1(x) for positive x.
 
double StruveH0 (double x)
 Struve function of order 0.
 
double StruveH1 (double x)
 Struve function of order 1.
 
double StruveL0 (double x)
 Modified Struve function of order 0.
 
double StruveL1 (double x)
 Modified Struve function of order 1.
 
double BesselK0exp (double x)
 Modified Bessel function K_0(x), divided by exponential factor.
 
double BesselK1exp (double x)
 Modified Bessel function K_1(x), divided by exponential factor.
 
double BesselKexp (int n, double x)
 Modified Bessel function K_n(x), divided by exponential factor.
 
double BesselI0exp (double x)
 Modified Bessel function I_0(x), divided by exponential factor.
 
double BesselI1exp (double x)
 Modified Bessel function I_1(x), divided by exponential factor.
 
double BesselIexp (int n, double x)
 Modified Bessel function I_n(x), divided by exponential factor.
 
double LogGamma (double x)
 Computes the logarithm of the Gamma function.
 
double Gamma (double x)
 Computes the Gamma function.
 
template<typename T>
LambertW0 (T z)
 Computes the Lambert W function (0-branch) using Halley's method.
 

Function Documentation

◆ BesselI()

double thermalfist::xMath::BesselI ( int n,
double x )

Integer order modified Bessel function I_n(x)

Bessel and related special functions. Implementation of these special functions is adapted from the CERN-ROOT package: https://root.cern.ch/

Parameters
nOrder of the Bessel function
xArgument of the Bessel function
Returns
Value of the Bessel function I_n(x)

Definition at line 192 of file xMath.cpp.

◆ BesselI0()

double thermalfist::xMath::BesselI0 ( double x)

Modified Bessel function I_0(x)

Parameters
xArgument of the Bessel function
Returns
Value of the Bessel function I_0(x)

Definition at line 23 of file xMath.cpp.

◆ BesselI0exp()

double thermalfist::xMath::BesselI0exp ( double x)

Modified Bessel function I_0(x), divided by exponential factor.

Parameters
xArgument of the Bessel function
Returns
Value of I_0(x) * exp(-x)

Definition at line 723 of file xMath.cpp.

◆ BesselI1()

double thermalfist::xMath::BesselI1 ( double x)

Modified Bessel function I_1(x)

Parameters
xArgument of the Bessel function
Returns
Value of the Bessel function I_1(x)

Definition at line 91 of file xMath.cpp.

◆ BesselI1exp()

double thermalfist::xMath::BesselI1exp ( double x)

Modified Bessel function I_1(x), divided by exponential factor.

Parameters
xArgument of the Bessel function
Returns
Value of I_1(x) * exp(-x)

Definition at line 755 of file xMath.cpp.

◆ BesselIexp()

double thermalfist::xMath::BesselIexp ( int n,
double x )

Modified Bessel function I_n(x), divided by exponential factor.

Parameters
nOrder of the Bessel function
xArgument of the Bessel function
Returns
Value of I_n(x) * exp(-x)

Definition at line 791 of file xMath.cpp.

◆ BesselJ0()

double thermalfist::xMath::BesselJ0 ( double x)

Bessel function J0(x) for any real x.

Parameters
xArgument of the Bessel function
Returns
Value of the Bessel function J0(x)

Definition at line 235 of file xMath.cpp.

◆ BesselJ1()

double thermalfist::xMath::BesselJ1 ( double x)

Bessel function J1(x) for any real x.

Parameters
xArgument of the Bessel function
Returns
Value of the Bessel function J1(x)

Definition at line 271 of file xMath.cpp.

◆ BesselK()

double thermalfist::xMath::BesselK ( int n,
double x )

Integer order modified Bessel function K_n(x)

Parameters
nOrder of the Bessel function
xArgument of the Bessel function
Returns
Value of the Bessel function K_n(x)

Definition at line 162 of file xMath.cpp.

◆ BesselK0()

double thermalfist::xMath::BesselK0 ( double x)

Modified Bessel function K_0(x)

Parameters
xArgument of the Bessel function
Returns
Value of the Bessel function K_0(x)

Definition at line 55 of file xMath.cpp.

◆ BesselK0exp()

double thermalfist::xMath::BesselK0exp ( double x)

Modified Bessel function K_0(x), divided by exponential factor.

Parameters
xArgument of the Bessel function
Returns
Value of K_0(x) * exp(x)

Definition at line 623 of file xMath.cpp.

◆ BesselK1()

double thermalfist::xMath::BesselK1 ( double x)

Modified Bessel function K_1(x)

Parameters
xArgument of the Bessel function
Returns
Value of the Bessel function K_1(x)

Definition at line 127 of file xMath.cpp.

◆ BesselK1exp()

double thermalfist::xMath::BesselK1exp ( double x)

Modified Bessel function K_1(x), divided by exponential factor.

Parameters
xArgument of the Bessel function
Returns
Value of K_1(x) * exp(x)

Definition at line 657 of file xMath.cpp.

◆ BesselKexp()

double thermalfist::xMath::BesselKexp ( int n,
double x )

Modified Bessel function K_n(x), divided by exponential factor.

Parameters
nOrder of the Bessel function
xArgument of the Bessel function
Returns
Value of K_n(x) * exp(x)

Definition at line 693 of file xMath.cpp.

◆ BesselY0()

double thermalfist::xMath::BesselY0 ( double x)

Bessel function Y0(x) for positive x.

Parameters
xArgument of the Bessel function (must be positive)
Returns
Value of the Bessel function Y0(x)

Definition at line 308 of file xMath.cpp.

◆ BesselY1()

double thermalfist::xMath::BesselY1 ( double x)

Bessel function Y1(x) for positive x.

Parameters
xArgument of the Bessel function (must be positive)
Returns
Value of the Bessel function Y1(x)

Definition at line 343 of file xMath.cpp.

◆ Gamma()

double thermalfist::xMath::Gamma ( double x)

Computes the Gamma function.

Parameters
xArgument of the function
Returns
Value of Gamma(x)

Definition at line 834 of file xMath.cpp.

◆ GeVtoifm()

double thermalfist::xMath::GeVtoifm ( )
constexpr

A constant to transform GeV into fm \(^{-1}\).

Definition at line 25 of file xMath.h.

◆ GeVtoifm2()

double thermalfist::xMath::GeVtoifm2 ( )
constexpr

A constant to transform GeV \(^{2}\) into fm \(^{-2}\).

Definition at line 28 of file xMath.h.

◆ GeVtoifm3()

double thermalfist::xMath::GeVtoifm3 ( )
constexpr

A constant to transform GeV \(^{3}\) into fm \(^{-3}\).

Definition at line 31 of file xMath.h.

◆ LambertW0()

template<typename T>
T thermalfist::xMath::LambertW0 ( T z)

Computes the Lambert W function (0-branch) using Halley's method.

The Lambert W function is the inverse function of ( f(W) = W e^W ). This implementation uses Halley's method to achieve the desired accuracy within 10 * epsilon, where epsilon is the machine precision. The initial guess for the iteration is z = 0.

Template Parameters
TThe type of the input value.
Parameters
zThe input value for which the Lambert W function is computed.
Returns
The computed value of the Lambert W function for the given input.

◆ LogGamma()

double thermalfist::xMath::LogGamma ( double x)

Computes the logarithm of the Gamma function.

Note that the functions Gamma and LogGamma are mutually dependent.

Parameters
xArgument of the function
Returns
Value of log(Gamma(x))

Definition at line 954 of file xMath.cpp.

◆ mnucleon()

double thermalfist::xMath::mnucleon ( )
constexpr

Nucleon's mass. Value as in UrQMD.

Definition at line 34 of file xMath.h.

◆ mpion()

double thermalfist::xMath::mpion ( )
constexpr

Pion's mass. Value as in UrQMD.

Definition at line 37 of file xMath.h.

◆ Pi()

double thermalfist::xMath::Pi ( )
constexpr

Pi constant.

Definition at line 23 of file xMath.h.

◆ StruveH0()

double thermalfist::xMath::StruveH0 ( double x)

Struve function of order 0.

Parameters
xArgument of the Struve function
Returns
Value of the Struve function H0(x)

Definition at line 380 of file xMath.cpp.

◆ StruveH1()

double thermalfist::xMath::StruveH1 ( double x)

Struve function of order 1.

Parameters
xArgument of the Struve function
Returns
Value of the Struve function H1(x)

Definition at line 450 of file xMath.cpp.

◆ StruveL0()

double thermalfist::xMath::StruveL0 ( double x)

Modified Struve function of order 0.

Parameters
xArgument of the modified Struve function
Returns
Value of the modified Struve function L0(x)

Definition at line 531 of file xMath.cpp.

◆ StruveL1()

double thermalfist::xMath::StruveL1 ( double x)

Modified Struve function of order 1.

Parameters
xArgument of the modified Struve function
Returns
Value of the modified Struve function L1(x)

Definition at line 578 of file xMath.cpp.