#libm #numeric

lnexp

Carefully evaluate compositions of log, exp, log1p and expm1

3 unstable releases

0.2.1 May 24, 2024
0.2.0 Jul 24, 2023
0.1.0 Jul 21, 2023

#1340 in Math

Download history 302/week @ 2025-11-27 110/week @ 2025-12-04 716/week @ 2025-12-11 137/week @ 2025-12-18 26/week @ 2025-12-25 510/week @ 2026-01-01 37/week @ 2026-01-08 27/week @ 2026-01-15 29/week @ 2026-01-22 126/week @ 2026-01-29 536/week @ 2026-02-05 137/week @ 2026-02-12 56/week @ 2026-02-19 54/week @ 2026-02-26 74/week @ 2026-03-05 58/week @ 2026-03-12

247 downloads per month
Used in 10 crates (via logsumexp)

MIT/Apache

33KB
554 lines

lnexp

crate documentation

Usage

Add this to your Cargo.toml:

[dependencies]
lnexp = "0.2"

Description

Provides a trait (LnExp) for floating-point types to perform careful evaluation of compositions of ln, ln_1p, exp and exp_m1. Implementations are provided for f64 and f32; see the documentation for details. The most common domain in which such compositions appear is statistical computing, but the advantages afforded by the implementations are neither specific nor limited to such a domain.

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

No runtime deps