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

◆ grad_F32()

template<bool grad_a1 = true, bool grad_a2 = true, bool grad_a3 = true, bool grad_b1 = true, bool grad_b2 = true, bool grad_z = true, typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 = double>
void stan::math::grad_F32 ( T1 *  g,
const T2 &  a1,
const T3 &  a2,
const T4 &  a3,
const T5 &  b1,
const T6 &  b2,
const T7 &  z,
const T8 &  precision = 1e-6,
int  max_steps = 1e5 
)

Gradients of the hypergeometric function, 3F2.

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

This power-series representation converges for all gradients under the same conditions as the 3F2 function itself.

Template Parameters
grad_a1boolean indicating if gradient with respect to a1 is required
grad_a2boolean indicating if gradient with respect to a2 is required
grad_a3boolean indicating if gradient with respect to a3 is required
grad_b1boolean indicating if gradient with respect to b1 is required
grad_b2boolean indicating if gradient with respect to b2 is required
grad_zboolean indicating if gradient with respect to z is required
T1a scalar type
T2a scalar type
T3a scalar type
T4a scalar type
T5a scalar type
T6a scalar type
T7a scalar type
T8a scalar type
Parameters
[out]gg pointer to array of six values of type T, result.
[in]a1a1 see generalized hypergeometric function definition.
[in]a2a2 see generalized hypergeometric function definition.
[in]a3a3 see generalized hypergeometric function definition.
[in]b1b1 see generalized hypergeometric function definition.
[in]b2b2 see generalized hypergeometric function definition.
[in]zz see generalized hypergeometric function definition.
[in]precisionprecision of the infinite sum
[in]max_stepsnumber of steps to take

Definition at line 55 of file grad_F32.hpp.