mp_units::get_relative_standard_uncertainty¶
Returns the relative standard uncertainty of a measured constant
Synopsis¶
Declared in <mp-units/framework/unit_definitions.h>
template<MeasuredConstant U>
[[nodiscard]] consteval UnitMagnitude auto get_relative_standard_uncertainty(U u);
Description¶
For a constant declared with standard_uncertainty, the result is derived as the exact ratio of the uncertainty's canonical magnitude to the constant's one (u_r = u(x)/|x|, so the result never carries a sign even for a negative-valued constant).
There is no valid result for constants that are exact by definition. Asking for one would conflate "exact by definition" with "measured infinitely precisely", so it is a compile-time error rather than a zero magnitude.
Return Value¶
the relative standard uncertainty of a measured constant
Note
The return value should not be discarded.