1 #ifndef STAN_MATH_REV_SCAL_FUN_CBRT_HPP
2 #define STAN_MATH_REV_SCAL_FUN_CBRT_HPP
8 #include <boost/math/special_functions/cbrt.hpp>
16 class cbrt_vari :
public op_v_vari {
18 explicit cbrt_vari(vari* avi) :
19 op_v_vari(::
cbrt(avi->val_), avi) {
22 avi_->adj_ += adj_ / (3.0 * val_ * val_);
56 return var(
new cbrt_vari(a.
vi_));
fvar< T > cbrt(const fvar< T > &x)
Independent (input) and dependent (output) variables for gradients.
vari * vi_
Pointer to the implementation of this variable.
var cbrt(const var &a)
Returns the cube root of the specified variable (C99).