MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / small_mul

Function small_mul

Source/external/fast_float.h:2099–2109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2097// multiply bigint by scalar value.
2098template <uint16_t size>
2099inline FASTFLOAT_CONSTEXPR20
2100bool small_mul(stackvec<size>& vec, limb y) noexcept {
2101 limb carry = 0;
2102 for (size_t index = 0; index < vec.len(); index++) {
2103 vec[index] = scalar_mul(vec[index], y, carry);
2104 }
2105 if (carry != 0) {
2106 FASTFLOAT_TRY(vec.try_push(carry));
2107 }
2108 return true;
2109}
2110
2111// add bigint to bigint starting from index.
2112// used in grade school multiplication

Callers 4

long_mulFunction · 0.85
large_mulFunction · 0.85
mulMethod · 0.85
pow5Method · 0.85

Calls 3

scalar_mulFunction · 0.85
try_pushMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected