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

◆ operator-() [15/18]

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

Subtraction operator for scalar and variable.

The derivative for the variable is

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

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

Definition at line 101 of file operator_subtraction.hpp.