Template Function librapid::detail::multiprec::addSmallX2(const T, const T)#
Defined in File complex.hpp
Function Documentation#
-
template<typename T>
constexpr auto librapid::detail::multiprec::addSmallX2(const T x, const T y) noexcept -> Fmp<T># Combines two 1x precision values into a 2x precision result with the requirement of specific exponent relationship.
Requires: exponent(x) + countr_zero(significand(x)) >= exponent(y) or x == 0
The result is exact when:
The requirement above is satisfied
No internal overflow occurs
Either underflow is gradual, or no internal underflow occurs
Intermediate precision is either the same as T, or greater than twice the precision of T
Parameters and local variables do not retain extra intermediate precision
Rounding mode is rounding to nearest
Violation of condition 3 or 5 could lead to relative error on the order of epsilon^2.
Violation of other conditions could lead to worse results
- Template Parameters
T – Template type
- Parameters
x – First value
y – Second value
- Returns
Sum of x and y