Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ grad_2F1() [1/2]

template<bool ReturnSameT, typename T1 , typename T2 , typename T3 , typename T_z , require_not_t< std::integral_constant< bool, ReturnSameT > > * = nullptr>
auto stan::math::grad_2F1 ( const T1 &  a1,
const T2 &  a2,
const T3 &  b1,
const T_z &  z,
double  precision = 1e-14,
int  max_steps = 1e6 
)

Calculate the gradients of the hypergeometric function (2F1) as the power series stopping when the series converges to within precision or throwing when the function takes max_steps steps.

Overload for use where the destination gradients are not required to be the same type as the input variables (most use-cases except grad_inc_beta)

Template Parameters
ReturnSameTWhether return gradients need to be the same type as as inputs
T1scalar type of a1
T2scalar type of a2
T3scalar type of b1
T_zscalar type of z
Parameters
[in]a1see generalized hypergeometric function definition
[in]a2see generalized hypergeometric function definition
[in]b1see generalized hypergeometric function definition
[in]zsee generalized hypergeometric function definition
[in]precisionmagnitude of the increment of the infinite sum to truncate the sum
[in]max_stepsnumber of steps to take

Overload for use where the destination gradients should be the same type as the input variables (needed for the grad_inc_beta overloads)

Template Parameters
ReturnSameTWhether return gradients need to be the same type as as inputs
T1scalar type of a1
T2scalar type of a2
T3scalar type of b1
T_zscalar type of z
Parameters
[in]a1see generalized hypergeometric function definition
[in]a2see generalized hypergeometric function definition
[in]b1see generalized hypergeometric function definition
[in]zsee generalized hypergeometric function definition
[in]precisionmagnitude of the increment of the infinite sum to truncate the sum
[in]max_stepsnumber of steps to take

Definition at line 271 of file grad_2F1.hpp.