Get the sum of two scaled numbers.
Declared in <llvm/Support/ScaledNumber.h>
template<class DigitsT>
std::pair<DigitsT, int16_t>
getSum(
DigitsT LDigits,
int16_t LScale,
DigitsT RDigits,
int16_t RScale);
Get the sum of two scaled numbers with as much precision as possible.
Sum as a digits/scale pair.
| Name | Description |
|---|---|
| LDigits | Digits of the left-hand scaled number. |
| LScale | Scale of the left-hand scaled number. |
| RDigits | Digits of the right-hand scaled number. |
| RScale | Scale of the right-hand scaled number. |
LScale (or RScale) will not overflow INT16_MAX.