Function trv::maths::eval_gamma_lnratio#

Function Documentation#

std::complex<double> trv::maths::eval_gamma_lnratio(double mu, std::complex<double> nu)#

Evaluate the logarithm of the ratio of two gamma functions.

The ratio is of the form \( \Gamma\big(\frac{\mu + \nu + 1}{2}\big) \big/ \Gamma\big(\frac{\mu - \nu + 1}{2}\big) \,, \) where \( \mu \) and \( \mathrm{Re}\,\{\nu\} \) are small, while \( \mathrm{Im}\,\{\nu\} \) may be large, in which case the Stirling approximation is used.

Parameters:
  • mu – Real variable.

  • nu – Complex variable.

Returns:

Logarithmic ratio.