1 #ifndef STAN__AGRAD__REV__FUNCTIONS__OWENS__T_HPP
2 #define STAN__AGRAD__REV__FUNCTIONS__OWENS__T_HPP
11 #include <boost/math/special_functions/owens_t.hpp>
19 class owens_t_vv_vari :
public op_vv_vari {
21 owens_t_vv_vari(vari* avi, vari* bvi) :
22 op_vv_vari(boost::math::
owens_t(avi->val_, bvi->val_), avi, bvi) {
32 bvi_->adj_ += adj_ *
std::exp(neg_avi_sq_div_2 * one_p_bvi_sq)
33 / (one_p_bvi_sq * 2.0 *
pi());
37 class owens_t_vd_vari :
public op_vd_vari {
39 owens_t_vd_vari(vari* avi,
double b) :
40 op_vd_vari(boost::math::
owens_t(avi->val_, b), avi, b) {
53 class owens_t_dv_vari :
public op_dv_vari {
55 owens_t_dv_vari(
double a, vari* bvi) :
56 op_dv_vari(boost::math::
owens_t(a, bvi->val_), a, bvi) {
66 / (one_p_bvi_sq * 2.0 *
pi());
84 return var(
new owens_t_vv_vari(h.
vi_, a.
vi_));
100 return var(
new owens_t_vd_vari(h.
vi_, a));
116 return var(
new owens_t_dv_vari(h, a.
vi_));
T square(const T x)
Return the square of the specified argument.
const double INV_SQRT_TWO_PI
fvar< T > erf(const fvar< T > &x)
fvar< T > square(const fvar< T > &x)
vari * vi_
Pointer to the implementation of this variable.
fvar< T > owens_t(const fvar< T > &x1, const fvar< T > &x2)
const double INV_SQRT_2
The value of 1 over the square root of 2, .
Independent (input) and dependent (output) variables for gradients.
double pi()
Return the value of pi.
fvar< T > exp(const fvar< T > &x)