MCPcopy Create free account
hub / github.com/apache/fory / multiply

Method multiply

cpp/fory/serialization/compatible_scalar.cc:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 }
63
64 void multiply(uint32_t factor) {
65 if (factor == 0 || is_zero()) {
66 limbs.clear();
67 return;
68 }
69 uint64_t carry = 0;
70 for (uint32_t &limb : limbs) {
71 uint64_t value = static_cast<uint64_t>(limb) * factor + carry;
72 limb = static_cast<uint32_t>(value);
73 carry = value >> 32;
74 }
75 if (carry != 0) {
76 limbs.push_back(static_cast<uint32_t>(carry));
77 }
78 }
79
80 void add(uint32_t value) {
81 uint64_t carry = value;

Callers 4

from_decimal_digitsMethod · 0.45
from_bytes_leMethod · 0.45
canonical_decimalFunction · 0.45
decimal_from_float_bitsFunction · 0.45

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected