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

◆ log_inv_logit_diff() [1/10]

template<typename T >
fvar< T > stan::math::log_inv_logit_diff ( const fvar< T > &  x,
const fvar< T > &  y 
)
inline

Returns fvar with the natural logarithm of the difference of the inverse logits of the specified arguments and its gradients.

\[ \mathrm{log\_inv\_logit\_diff}(x,y) = \ln\left(\frac{1}{1+\exp(-x)}-\frac{1}{1+\exp(-y)}\right) \]

\[ \frac{\partial }{\partial x} = -\frac{e^x}{e^y-e^x}-\frac{e^x}{e^x+1} \]

\[ \frac{\partial }{\partial x} = -\frac{e^y}{e^x-e^y}-\frac{e^y}{e^y+1} \]

Template Parameters
Tinner type of the fvar
Parameters
xArgument.
yArgument.
Returns
Fvar with result of log difference of inverse logits of arguments and gradients.

Definition at line 38 of file log_inv_logit_diff.hpp.