probl-engine 0.2.0

Internal to Probl, with no stable API: values, distributions and the world-set interpreter. Use the `probl` crate.
Documentation
1
2
3
4
5
6
7
8
9
//! Numerical conventions shared by scalar functions and probability calculations.

/// Preserve the correctly rounded identity exp(1) == e on every target.
/// libm 0.2.16 returns the next float above E at exactly 1. OpenLibm corrects
/// the same case: https://github.com/JuliaMath/openlibm/blob/master/src/e_exp.c
/// This is an exact-input correction, not a tolerance or result-rounding rule.
pub(crate) fn exp(x: f64) -> f64 {
    if x == 1.0 { std::f64::consts::E } else { libm::exp(x) }
}