Relative standard uncertainty of a measured constant

Synopsis

Declared in <mp‐units/framework/unit_definitions.h>

template<UnitMagnitude M>
struct relative_standard_uncertainty;

Description

Wraps the relative standard uncertainty (GUM/CODATA u_r) of a measured constant as an exact symbolic magnitude so that no representation type is imposed at the definition point. It is metadata only ‐ it never participates in unit equality, conversion factors, or symbolic simplification.

A measured constant declares exactly one of relative_standard_uncertainty and standard_uncertainty ‐ whichever form its source publishes. The published pair is mutually rounded, so carrying both would embed a contradiction. This form is invariant under a change of unit, so it is the right choice for a constant whose defining unit has no published absolute uncertainty.

For example:

{.cpp}
 inline constexpr struct newtonian_constant_of_gravitation final :
     named_constant<"G", mag_ratio<667'430, 100'000> * mag_power<10, -11> * m3 / kg / s2,
                    relative_standard_uncertainty{mag_ratio<22, 10> * mag_power<10, -5>}> {}
 newtonian_constant_of_gravitation;

Data Members

Name

magnitude

Template Parameters

Name

Description

M

an exact magnitude representing the relative standard uncertainty

Created with MrDocs