1 #ifndef STAN__AGRAD__REV__FUNCTIONS__TRUNC_HPP
2 #define STAN__AGRAD__REV__FUNCTIONS__TRUNC_HPP
7 #include <boost/math/special_functions/fpclassify.hpp>
13 class trunc_vari :
public op_v_vari {
15 trunc_vari(vari* avi) :
16 op_v_vari(::
trunc(avi->val_),avi) {
20 avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
56 return var(
new trunc_vari(a.
vi_));
bool isnan(const stan::agrad::var &v)
Checks if the given number is NaN.
fvar< T > trunc(const fvar< T > &x)
vari * vi_
Pointer to the implementation of this variable.
Independent (input) and dependent (output) variables for gradients.