Skip to content

mp_units::parts_per_million

Parts per million, a millionth of one

Synopsis

Declared in <mp-units/framework/unit_conversion.h>

struct parts_per_million final : named_unit<"ppm", mag_ratio<1, 1000000> * one>

Description

// the frequency error of a watch crystal
quantity nominal = 32'768. * Hz;
quantity measured = 32'768.5 * Hz;
quantity error = ((measured - nominal) / nominal).in(ppm);  // ≈ 15.26 ppm

Base Classes

See Also