Skip to content

Commit ba15044

Browse files
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.
1 parent a6d29fa commit ba15044

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/biguint/multiplication.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ fn mac3(mut acc: &mut [BigDigit], mut b: &[BigDigit], mut c: &[BigDigit]) {
369369
// in terms of its coefficients:
370370
//
371371
// w0 = w(0)
372-
// w1 = w(0)/2 + w(1)/3 - w(-1) + w(2)/6 - 2*w(inf)
372+
// w1 = w(0)/2 + w(1)/3 - w(-1) + w(-2)/6 - 2*w(inf)
373373
// w2 = -w(0) + w(1)/2 + w(-1)/2 - w(inf)
374-
// w3 = -w(0)/2 + w(1)/6 + w(-1)/2 - w(1)/6
374+
// w3 = -w(0)/2 + w(1)/6 + w(-1)/2 - w(-2)/6 + 2*w(inf)
375375
// w4 = w(inf)
376376
//
377377
// This particular sequence is given by Bodrato and is an interpolation

0 commit comments

Comments
 (0)