mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
make multiplication 64-bit
This commit is contained in:
parent
fb82e9050d
commit
8736dce71a
@ -264,7 +264,7 @@ class large_number {
|
||||
size_t i;
|
||||
uint64_t carry = 0, temp;
|
||||
for (i = 0; i < this->num_digits(); i++) {
|
||||
temp = (*this)[i] * n;
|
||||
temp = static_cast<uint64_t>((*this)[i]) * n;
|
||||
temp += carry;
|
||||
if (temp < 10) {
|
||||
carry = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user