The FAU Adder
When computing with unsigned integers
The FAU adder is an adder that speed up the computation of the sum by splitting the carry chain. In order to keep the error small, some bits of the least-significant part are used in a carry prediction unit.
See the uses cases and [Echavarria2016] for details.
Header aaarith/integer/integer_approx_operations.hpp
When computing with floating_points
The FAU adder can also be used when computing with floating_point numbers. Here, the FAU adder ist used to approximately compute the mantissa.
Header aaarith/float/float_approx_operations.hpp
-
template<size_t E, size_t M, size_t LSP, size_t SHARED>
auto aarith::FAU_add(const floating_point<E, M> lhs, const floating_point<E, M> rhs) -> floating_point<E, M> Addition of two floating_points using the FAU adder: lhs+rhs.
- Parameters
lhs – The first number that is to be summed up
rhs – The second number that is to be summed up
bits – The number of most-significant bits that are calculated of the mantissa addition
- Template Parameters
E – Width of exponent
M – Width of mantissa including the leading 1
- Returns
The sum
-
template<size_t E, size_t M, size_t LSP, size_t SHARED>
auto aarith::FAU_sub(const floating_point<E, M> lhs, const floating_point<E, M> rhs) -> floating_point<E, M> Subtraction with floating_points using the FAU adder: lhs-rhs.
- Parameters
lhs – The minuend
rhs – The subtrahend
bits – The number of most-significant bits that are calculated of the mantissa subtraction
- Template Parameters
E – Width of exponent
M – Width of mantissa including the leading 1
- Returns
The difference lhs-rhs