Provides two traits:
LogAddExp, which provides a numerically stable evaluation ofln(exp(a) + exp(b)), utilizingln_1p_expfrom thelnexpcrate. Implementations are provided for forf64andf32(and their respective references).LogSumExp, which provides a numerically stable, 1-pass (online) algorithm for evaluation of LogSumExp with correct handling of +/- infinity andnan. Implementations are provided iterators which produceItems off64orf32(and for respective references).
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.