Skip to content

mp_units::utility::operator-

Subtraction of two uncertain values

Synopsis

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

[[nodiscard]] constexpr uncertain operator-(uncertain const& lhs, uncertain const& rhs);

Description

NOTE

Assumes independent values. Formula: σ² = σx² + σ

WARNING

For correlated values (e.g., x - x), this will incorrectly give non-zero uncertainty.

Return Value

Note

The return value should not be discarded.

Parameters

NameDescription
lhsThe left operand
rhsThe right operand