Skip to content

mp_units::utility::operator*

Multiplication 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: σf² = (y·σx)² + (x·σ_y)²

NOTE

This is the absolute form of f/f)² = (σx/x)² + (σ_y/y)². The two agree for non-zero operands, but the relative form divides by the value, so it yields NaN when an operand is zero (0 ± 0.1 is a perfectly ordinary measurement).

Return Value

Note

The return value should not be discarded.

Parameters

NameDescription
lhsThe left operand
rhsThe right operand