MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / small_add_from

Function small_add_from

app/src/ThirdParty/fast_float.h:3659–3673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3657// used in grade school multiplication
3658template <uint16_t size>
3659inline FASTFLOAT_CONSTEXPR20 bool small_add_from(stackvec<size> &vec, limb y,
3660 size_t start) noexcept {
3661 size_t index = start;
3662 limb carry = y;
3663 bool overflow;
3664 while (carry != 0 && index < vec.len()) {
3665 vec[index] = scalar_add(vec[index], carry, overflow);
3666 carry = limb(overflow);
3667 index += 1;
3668 }
3669 if (carry != 0) {
3670 FASTFLOAT_TRY(vec.try_push(carry));
3671 }
3672 return true;
3673}
3674
3675// add scalar value to bigint.
3676template <uint16_t size>

Callers 2

small_addFunction · 0.85
large_add_fromFunction · 0.85

Calls 3

scalar_addFunction · 0.85
try_pushMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected