pub trait LogAddExp<Rhs = Self> {
    type Output;

    fn ln_add_exp(self, other: Rhs) -> Self::Output;
}
Expand description

A trait for computing ln_add_exp

Required Associated Types

The result of the computation

Required Methods

Compute the log of the addition of the exponentials

This computes the same value value as (self.exp() + other.exp()).ln() but in a more numerically stable way then computing it using that formula.

Examples
use logaddexp::LogAddExp;
100_f64.ln().ln_add_exp(0.0); // 101_f64.ln()

Implementors