Skip to content

Commit

Permalink
Fixed incorrect formulas for coefficients.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
secret-playfair-rust committed May 9, 2024
1 parent a6d29fa commit ba15044
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/biguint/multiplication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba15044

Please sign in to comment.