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

◆ log_sum_exp_signed()

template<typename T1 , typename T2 , require_all_stan_scalar_t< T1, T2 > * = nullptr>
std::tuple< return_type_t< T1, T2 >, int > stan::math::log_sum_exp_signed ( const T1 &  a,
int  a_sign,
const T2 &  b,
int  b_sign 
)
inline

Calculates the log sum of exponentials without overflow, accounting for the signs of the inputs.

Template Parameters
T1type of the first variable
T2type of the second variable
Parameters
athe first variable
a_signsign of the first variable
bthe second variable
b_signsign of the second variable

Definition at line 28 of file log_sum_exp_signed.hpp.