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

◆ operator-() [14/18]

template<typename Arith , require_arithmetic_t< Arith > * = nullptr>
var stan::math::operator- ( const var a,
Arith  b 
)
inline

Subtraction operator for variable and scalar.

The derivative for the variable is

\(\frac{\partial}{\partial x} (x-c) = 1\), and

Template Parameters
Varvalue type of a var
ArithAn arithmetic type
Parameters
aFirst variable operand.
bSecond scalar operand.
Returns
Result of subtracting the scalar from the variable.

Definition at line 78 of file operator_subtraction.hpp.