bool bigmul(unsigned long long qhat, unsigned product[], unsigned vn[], int m,
int n)
{
- long long t, k;
- int s, i;
// Multiply and subtract.
uint32_t carry = 0;
// VL = n + 1
unsigned *un, *vn; // Normalized form of u, v.
unsigned long long qhat; // Estimated quotient digit.
unsigned long long rhat; // A remainder.
- unsigned long long p; // Product of two digits.
- long long t, k;
- int s, i, j;
+ long long k;
+ int s, j;
if (m < n || n <= 0 || v[n - 1] == 0)
return 1; // Return if invalid param.
bool bigmul(uint32_t qhat, unsigned product[], unsigned vn[], int m, int n)
{
- long long t, k;
- int s, i;
uint32_t carry = 0;
// VL = n + 1
// sv.madded product.v, vn.v, qhat.s, carry.s
un[j + n] = t;
bool need_fixup = t < 0;
#elif defined(SUB_MUL_BORROW)
- (void)p; // shut up unused variable warning
+ (void)p, (void)t; // shut up unused variable warning
// Multiply and subtract.
uint32_t borrow = 0;
}
bool need_fixup = borrow != 0;
#elif defined(MUL_RSUB_CARRY)
- (void)p; // shut up unused variable warning
+ (void)p, (void)t; // shut up unused variable warning
// Multiply and subtract.
uint32_t carry = 1;
}
bool need_fixup = carry != 1;
#elif defined(SUB_MUL_BORROW_2_STAGE)
- (void)p; // shut up unused variable warning
+ (void)p, (void)t; // shut up unused variable warning
// Multiply and subtract.
uint32_t borrow = 0;
}
bool need_fixup = borrow != 0;
#elif defined(MUL_RSUB_CARRY_2_STAGE)
- (void)p; // shut up unused variable warning
+ (void)p, (void)t; // shut up unused variable warning
// Multiply and subtract.
uint32_t carry = 1;
}
bool need_fixup = carry != 1;
#elif defined(MUL_RSUB_CARRY_2_STAGE1)
- (void)p; // shut up unused variable warning
+ (void)p, (void)t; // shut up unused variable warning
// Multiply and subtract.
uint32_t carry = 1;
}
bool need_fixup = carry != 1;
#elif defined(MUL_RSUB_CARRY_2_STAGE2)
- (void)p; // shut up unused variable warning
+ (void)p, (void)t; // shut up unused variable warning
// Multiply and subtract.
uint32_t carry = 0;
}
bool need_fixup = carry != 0;
#elif defined(MADDED_SUBFE)
- (void)p; // shut up unused variable warning
+ (void)p, (void)t; // shut up unused variable warning
// Multiply and subtract.
uint32_t carry = 0;