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.

Reply via email to