Stan Math Library  2.10.0
reverse mode automatic differentiation
divide.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_DIVIDE_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_DIVIDE_HPP
3 
5 #include <cstddef>
6 #include <cstdlib>
7 
8 namespace stan {
9  namespace math {
10 
18  template<typename T1, typename T2>
19  inline typename stan::return_type<T1, T2>::type
20  divide(const T1& x, const T2& y) {
21  return x / y;
22  }
23 
24  inline int divide(const int x, const int y) {
25  return std::div(x, y).quot;
26  }
27 
28 
29  }
30 }
31 
32 #endif
boost::math::tools::promote_args< typename scalar_type< T1 >::type, typename scalar_type< T2 >::type, typename scalar_type< T3 >::type, typename scalar_type< T4 >::type, typename scalar_type< T5 >::type, typename scalar_type< T6 >::type >::type type
Definition: return_type.hpp:27
Eigen::Matrix< fvar< T >, R, C > divide(const Eigen::Matrix< fvar< T >, R, C > &v, const fvar< T > &c)
Definition: divide.hpp:16

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