Skip to content

mp_units::utility::exp

Exponential function of an uncertain value

Synopsis

Declared in <mp-units/utility/uncertain.h>

[[nodiscard]] constexpr uncertain exp(uncertain const& arg)
  requires requires { exp(arg.value()); } || requires { std::exp(arg.value()); };

Description

NOTE

Formula: if f = exp(x), then σf = |exp(x) × σx| = |f × σ_x|

WARNING

Uncertainty grows exponentially with the value. For large x, this can lead to very large relative uncertainties where first-order approximation breaks down.

Return Value

Note

The return value should not be discarded.