1 unstable release
| 0.1.0 | Jul 25, 2023 |
|---|
#2076 in Math
487 downloads per month
Used in 9 crates
(via ganesh)
23KB
334 lines
logsumexp
Description
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).
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