logsumexp

Crates.iologsumexp
lib.rslogsumexp
version0.1.0
sourcesrc
created_at2023-07-25 01:42:13.138145
updated_at2023-07-25 01:42:13.138145
descriptionNumerically stable computation of log-sum-exp using a 1-pass algorithm
homepage
repositoryhttps://github.com/andrewjradcliffe/logsumexp/
max_upload_size
id925086
size34,795
Andrew Radcliffe (andrewjradcliffe)

documentation

README

logsumexp

Description

Provides two traits:

  • LogAddExp, which provides a numerically stable evaluation of ln(exp(a) + exp(b)), utilizing ln_1p_exp from the lnexp crate. Implementations are provided for for f64 and f32 (and their respective references).
  • LogSumExp, which provides a numerically stable, 1-pass (online) algorithm for evaluation of LogSumExp with correct handling of +/- infinity and nan. Implementations are provided iterators which produce Items of f64 or f32 (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

Commit count: 27

cargo fmt