ifft output issues


feazzu
12-17-2012, 09:05 AM
Hi,
i have a issues using twofft routin in c.
i'm tryng to implement a program that calculate N! with the binary splitting method.
up to a certain n, all goes right, but when the numbers (floating arrays) are too big, the ifft (calculate with four1),after normalizzation and rounding, has values that are wrong.
for example, if i have two number with 2000 digits that ends with 40 zeros, and i have to multiply them each other, when i calculate the ifft, some ending zeros become "one".
this happens because when i rounded one of this "zeros", (0,50009 for examples), they became "one".
Now, i don't know if is my implementation wrong or if i have to rounding this numebrs in a different way.
this issues is also for the zeros of the array before that the number starts,but i kept it under control.
has anyone had these problems?
thanks for your attention and sorry for my bad english..:D