pub fn decayed_fraction_from_decay_constant( decay_constant: f64, time: f64, ) -> Option<f64>
Computes the decayed fraction from a decay constant and elapsed time.
Formula: fraction_decayed = 1 - exp(-lambda * t).
fraction_decayed = 1 - exp(-lambda * t)