-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgamma.hpp
34 lines (28 loc) · 950 Bytes
/
gamma.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef _LSONG_GAMMA
#define _LSONG_GAMMA
#include <stdio.h>
#include <math.h>
#ifndef M_PIl
/** The constant Pi in high precision */
#define M_PIl 3.1415926535897932384626433832795029L
#endif
#ifndef M_GAMMAl
/** Euler's constant in high precision */
#define M_GAMMAl 0.5772156649015328606065120900824024L
#endif
#ifndef M_LN2l
/** the natural logarithm of 2 in high precision */
#define M_LN2l 0.6931471805599453094172321214581766L
#endif
/** The digamma function in long double precision.
* @param x the real value of the argument
* @return the value of the digamma (psi) function at that point
* @author Richard J. Mathar
* @since 2005-11-24
*/
long double digammal(long double x) ;
//https://people.sc.fsu.edu/~jburkardt/cpp_src/asa121/asa121.hpp
double trigamma ( double x, int *ifault );
double LogGammaDensity( double x, double k, double theta ) ;
double MixtureGammaAssignment( double x, double pi, double* k, double *theta ) ;
#endif