Computes the square root of the sum of the squares of x, y, and z, without undue overflow or underflow at intermediate stages of the computation

Synopsis

Declared in <mp‐units/math.h>

template<
    auto R1,
    typename Rep1,
    auto R2,
    typename Rep2,
    auto R3,
    typename Rep3>
requires requires(Rep1 v1, Rep2 v2, Rep3 v3) {
    get_common_reference(R1, R2, R3);
    requires requires { hypot(v1, v2, v3); } || requires { std::hypot(v1, v2, v3); };
  }
[[nodiscard]]
constexpr
QuantityOf<get_quantity_spec(get_common_reference(R1, R2, R3))> auto
hypot(
    quantity<R1, Rep1> const& x,
    quantity<R2, Rep2> const& y,
    quantity<R3, Rep3> const& z) noexcept;

Parameters

Name

Description

x

A quantity

y

A quantity

z

A quantity

Created with MrDocs