All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
sin.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_FWD_SCAL_FUN_SIN_HPP
#define STAN_MATH_FWD_SCAL_FUN_SIN_HPP
#include <stan/math/fwd/core.hpp>
namespace stan {
namespace math {
template <typename T>
inline
fvar<T>
sin(const fvar<T>& x) {
using std::sin;
using std::cos;
return fvar<T>(sin(x.val_),
x.d_ * cos(x.val_));
}
}
}
#endif
stan::math::cos
fvar< T > cos(const fvar< T > &x)
Definition: cos.hpp:13
stan::math::sin
var sin(const var &a)
Return the sine of a radian-scaled variable (cmath).
Definition: sin.hpp:49
core.hpp
stan::math::fvar::d_
T d_
Definition: fvar.hpp:15
stan::math::sin
fvar< T > sin(const fvar< T > &x)
Definition: sin.hpp:14
stan::math::fvar::val_
T val_
Definition: fvar.hpp:14
stan::math::fvar
Definition: fvar.hpp:13

[ Stan Home Page ] © 2011–2015, Stan Development Team.