1#ifndef STAN_MATH_PRIM_FUN_FINITE_DIFF_STEPSIZE_HPP
2#define STAN_MATH_PRIM_FUN_FINITE_DIFF_STEPSIZE_HPP
23 static const double cbrt_epsilon = std::cbrt(
EPSILON);
24 return cbrt_epsilon * std::fmax(1,
fabs(u));
static constexpr double EPSILON
Smallest positive value.
double finite_diff_stepsize(double u)
Return the stepsize for finite difference evaluations at the specified scalar.
fvar< T > fabs(const fvar< T > &x)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...