Skip to content

mp_units::utility::possibly_within

Checks whether the expanded uncertainty interval overlaps the limits

Synopsis

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

[[nodiscard]] constexpr bool possibly_within(
  uncertain const& val, value_type const& lower_limit, value_type const& upper_limit,
  value_type coverage_factor = static_cast<value_type>(2));

Note

This function is a hidden friend of uncertain, declared only inside that class: it can be found only through argument-dependent lookup.

Description

The value can't be rejected as outside the limits: [value - U, value + U], with U = k·σ, has at least one point in common with them.

Return Value

Note

The return value should not be discarded.

Parameters

NameDescription
coverage_factorThe coverage factor, 2 (about 95 %) by default