Hi Brian, I am not sure how n ever gets to be zero. It should start as a power of 2 and always remain thus. Probably the bug is elsewhere.
Bill. On 3 January 2012 13:42, Cactus <rieman...@gmail.com> wrote: > I think I have found the problem. > > Both ifft_radix2_twiddle and ifft_radix2_twiddle don't guard against entry > with n = 0. I changed the first part of both routines according to the > template: > > if (n < 2) > { > mp_size_t tw1, tw2; > tw1 = r*c; > tw2 = tw1 + rs*c; > > if(n) > { > ifft_butterfly_twiddle(*t1, *t2, ii[0], ii[is], limbs, tw1*ws, > tw2*ws); > > SWAP_PTRS(ii[0], *t1); > SWAP_PTRS(ii[is], *t2); > } > > return; > } > > and all tests now pass. > > I noticed that the routine fft_radix2_twiddle is tail recursive so we can > reduce its memory footprint and maybe gain some speed by eliminating the > tail call. > > Brian > > -- > You received this message because you are subscribed to the Google Groups > "mpir-devel" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/mpir-devel/-/TQnb2K3MiKgJ. > > To post to this group, send email to mpir-devel@googlegroups.com. > To unsubscribe from this group, send email to > mpir-devel+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/mpir-devel?hl=en. -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To post to this group, send email to mpir-devel@googlegroups.com. To unsubscribe from this group, send email to mpir-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/mpir-devel?hl=en.