FFT bugs

5 views
Skip to first unread message

Bill Hart

unread,
Jan 9, 2012, 4:31:05 PM1/9/12
to mpir-dev
I've found a number of bugs in the FFT which will need to be patched
in the mpir version:

* adjust_sqrt2.c:
line 71: cy = mpn_neg_n(temp, r + limbs - y, y); ==> if (y) cy =
mpn_neg_n(temp, r + limbs - y, y);
also add a line cy = 0; a few lines before

* ifft_truncate_sqrt2.c:
line 62: cy = mpn_neg_n(temp, i2 + limbs - y, y); ==> if (y) cy =
mpn_neg_n(temp, i2 + limbs - y, y);
also add cy = 0; somewhere

* fft_truncate_sqrt2.c:
line 64: cy = mpn_neg_n(temp, t + limbs - y, y); ==> if (y) cy =
mpn_neg_n(temp, t + limbs - y, y);
also add cy = 0; somewhere

* mulmod_2expp1.c:
line 124: c = ii[j][limbs] + 2*jj[j][limbs]; ==> c = 2*ii[j][limbs]
+ jj[j][limbs];
line 193: mp_limb_t c = i1[limbs] + 2*i2[limbs]; ==> mp_limb_t c =
2*i1[limbs] + i2[limbs];

* mul_truncate_sqrt2.c
line 94: c = ii[j][limbs] + 2*jj[j][limbs]; ==> c = 2*ii[j][limbs]
+ jj[j][limbs];

Bill.

Reply all
Reply to author
Forward
0 new messages