comparison PsiCLASS-1.0.2/gamma.hpp @ 0:903fc43d6227 draft default tip

Uploaded
author lsong10
date Fri, 26 Mar 2021 16:52:45 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:903fc43d6227
1 #ifndef _LSONG_GAMMA
2 #define _LSONG_GAMMA
3
4 #include <stdio.h>
5 #include <math.h>
6
7 #ifndef M_PIl
8 /** The constant Pi in high precision */
9 #define M_PIl 3.1415926535897932384626433832795029L
10 #endif
11 #ifndef M_GAMMAl
12 /** Euler's constant in high precision */
13 #define M_GAMMAl 0.5772156649015328606065120900824024L
14 #endif
15 #ifndef M_LN2l
16 /** the natural logarithm of 2 in high precision */
17 #define M_LN2l 0.6931471805599453094172321214581766L
18 #endif
19
20 /** The digamma function in long double precision.
21 * @param x the real value of the argument
22 * @return the value of the digamma (psi) function at that point
23 * @author Richard J. Mathar
24 * @since 2005-11-24
25 */
26 long double digammal(long double x) ;
27
28 //https://people.sc.fsu.edu/~jburkardt/cpp_src/asa121/asa121.hpp
29 double trigamma ( double x, int *ifault );
30
31
32 double LogGammaDensity( double x, double k, double theta ) ;
33 double MixtureGammaAssignment( double x, double pi, double* k, double *theta ) ;
34 #endif