From ba15044897e52e4fe23ea3eeeab1b9bf8881a2ce Mon Sep 17 00:00:00 2001 From: Ralph Tandetzky Date: Fri, 10 May 2024 01:13:05 +0200 Subject: [PATCH] Fixed incorrect formulas for coefficients. This concerns only the comments for big integer multiplication where the formulas for the coefficients w0..w4 are explicitly listed. These were not completely correct. --- src/biguint/multiplication.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/biguint/multiplication.rs b/src/biguint/multiplication.rs index c97c7e1a..e9d21384 100644 --- a/src/biguint/multiplication.rs +++ b/src/biguint/multiplication.rs @@ -369,9 +369,9 @@ fn mac3(mut acc: &mut [BigDigit], mut b: &[BigDigit], mut c: &[BigDigit]) { // in terms of its coefficients: // // w0 = w(0) - // w1 = w(0)/2 + w(1)/3 - w(-1) + w(2)/6 - 2*w(inf) + // w1 = w(0)/2 + w(1)/3 - w(-1) + w(-2)/6 - 2*w(inf) // w2 = -w(0) + w(1)/2 + w(-1)/2 - w(inf) - // w3 = -w(0)/2 + w(1)/6 + w(-1)/2 - w(1)/6 + // w3 = -w(0)/2 + w(1)/6 + w(-1)/2 - w(-2)/6 + 2*w(inf) // w4 = w(inf) // // This particular sequence is given by Bodrato and is an interpolation