Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ square() [4/8]

double stan::math::square ( double  x)
inline

Return the square of the specified argument.

\(\mbox{square}(x) = x^2\).

The implementation of square(x) is just x * x. Given this, this method is mainly useful in cases where x is not a simple primitive type, particularly when it is an autodiff type.

Parameters
xInput to square.
Returns
Square of input.

Definition at line 26 of file square.hpp.