#ifndef SHRIMPS_Tools_Special_Functions_H #define SHRIMPS_Tools_Special_Functions_H #include "ATOOLS/Org/Message.H" #include "ATOOLS/Math/MathTools.H" #include "ATOOLS/Math/Gauss_Integrator.H" using namespace ATOOLS; namespace SHRIMPS { /*! \file This file contains an assortment of special functions neccessary for the SHRIMPS::Form_Factor. \todo Further expand and move to ATOOLS::MathTools */ class Special_Functions { public: double LnGamma(const double & x) const { static const double coeff[6] = { 76.18009172947146, -86.50532032941677, 24.01409824083091, -1.231739572450155, 0.1208650973866179e-2, -0.5395239384953e-5 }; double y(x), tmp(x+5.5); tmp -= (x+0.5)*log(tmp); double arg(1.000000000190015); for (short int j=0;j<6;j++) arg += coeff[j]/++y; return -tmp+log(2.5066282746310005*arg/x); } double IncompleteGamma(const double & a, const double & x) const { double incgam(0.); if (x<0. || a<0.) { msg_Error()<<"Error in "<