ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dinvgamma.cpp
Go to the documentation of this file.
1 #include "statsLib.h"
2 
15 //inverse-gamma
16 dvariable dinvgamma(const dvariable& x, const double a, const double b)
17 {
18  return -a*log(b)+gammln(a)+(a+1)*log(x)+b/x;
19 }
dvariable dinvgamma(const dvariable &x, const double a, const double b)
Definition: dinvgamma.cpp:16
double gammln(double xx)
Log gamma function.
Definition: combc.cpp:52
#define x
Library of statistic functions.
Fundamental data type for reverse mode automatic differentiation.
Definition: fvar.hpp:1518
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: d3arr2a.cpp:13