1 #ifndef STAN_MATH_PRIM_SCAL_FUN_TRIGAMMA_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_TRIGAMMA_HPP
54 double small = 0.0001;
61 double b2 = 1.0 / 6.0;
62 double b4 = -1.0 / 30.0;
63 double b6 = 1.0 / 42.0;
64 double b8 = -1.0 / 30.0;
68 if ((x <= 0.0) && (
floor(x) == x)) {
75 if ((x <= 0) && (
floor(x) != x)) {
90 value += 1.0 / (z * z);
97 value += 0.5 * y + (1.0 + y * (b2 + y * (b4 + y * (b6 + y * b8)))) / z;
fvar< T > sin(const fvar< T > &x)
double positive_infinity()
Return positive infinity.
fvar< T > floor(const fvar< T > &x)
double pi()
Return the value of pi.