1 #ifndef STAN_MATH_REV_SCAL_FUN_TRUNC_HPP
2 #define STAN_MATH_REV_SCAL_FUN_TRUNC_HPP
10 #include <boost/math/special_functions/trunc.hpp>
18 class trunc_vari :
public op_v_vari {
20 explicit trunc_vari(vari* avi) :
21 op_v_vari(::
trunc(avi->val_), avi) {
25 avi_->adj_ = std::numeric_limits<double>::quiet_NaN();
61 return var(
new trunc_vari(a.
vi_));
var trunc(const var &a)
Returns the truncatation of the specified variable (C99).
Independent (input) and dependent (output) variables for gradients.
fvar< T > trunc(const fvar< T > &x)
vari * vi_
Pointer to the implementation of this variable.
int is_nan(const fvar< T > &x)
Returns 1 if the input's value is NaN and 0 otherwise.