Stan Math Library  2.20.0
reverse mode automatic differentiation
square.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_SQUARE_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_SQUARE_HPP
3 
4 #include <cmath>
5 
6 namespace stan {
7 namespace math {
8 
22 inline double square(double x) { return std::pow(x, 2); }
23 
24 } // namespace math
25 } // namespace stan
26 
27 #endif
fvar< T > square(const fvar< T > &x)
Definition: square.hpp:12
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition: pow.hpp:16

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