2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Add doc blurb

This commit is contained in:
Matt Borland
2025-09-08 13:52:41 +02:00
parent 8f09cda31a
commit b8e1276b79

View File

@@ -310,11 +310,17 @@ calculated using NTL::RR at 1000-bit precision.
template <class T1, class T2, class ``__Policy``>
``__sf_result`` hypot(T1 x, T2 y, const ``__Policy``&);
template <class T1, class T2, class T3>
``__sf_result`` hypot(T1 x, T2 y, T3 z);
template <class T1, class T2, class T3, class ``__Policy``>
``__sf_result`` hypot(T1 x, T2 y, T3 z, const ``__Policy``&);
__effects computes [equation hypot]
in such a way as to avoid undue underflow and overflow.
The return type of this function is computed using the __arg_promotion_rules
when T1 and T2 are of different types.
when T1 and T2 (and or T3) are of different types.
[optional_policy]
@@ -328,6 +334,11 @@ The function is even and symmetric in /x/ and /y/, so first take assume
Then if ['x * [epsilon] >= y] we can simply return /x/.
In the 3-arg case the approach is to scale by the largest argument, and then calculate
const auto a = max(max(x, y), z);
return a == 0 ? 0 : a * sqrt(x/a * x/a + y/a * y/a + z/a * z/a);
Otherwise the result is given by:
[equation hypot2]