1 unstable release
0.1.0 | Jul 25, 2023 |
---|
#1237 in Math
23KB
334 lines
logsumexp
Description
Provides two traits:
LogAddExp
, which provides a numerically stable evaluation ofln(exp(a) + exp(b))
, utilizingln_1p_exp
from thelnexp
crate. Implementations are provided for forf64
andf32
(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 produceItem
s off64
orf32
(and for respective references).
License
Licensed under either of
at your option.
Contribution
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.
Citations
Dependencies
~33KB