@verb #144:"poly_mult" this none this rxdo #55 @program #144:"poly_mult" this none this {@bignums} = args complex_list = {} maxloglen = 0.0 for x in (bignums) for y in [1..length(x)] x[y] = {tofloat(x[y]), 0.0} endfor complex_list = {@complex_list, x} maxloglen = max(maxloglen, log(tofloat(length(x))) / log(2.0)) endfor l = 2 ^ toint(ceil(maxloglen)) ffts = {} for x in (complex_list) ffts = {@ffts, $complex_utils:fft({@$list_utils:make(l - length(x), {0.0, 0.0}), @x})} endfor r = {} for x in [1..l] s = {1.0, 0.0} for y in (ffts) s = $complex_utils:product(s, y[x]) endfor r = {@r, s} endfor answer = $complex_utils:unfft(r) for x in [1..length(answer)] answer[x] = toint(answer[x][1]) endfor return answer "This verb previously owned by manta (#7165), and chowned to $slacker upon dewizarding (Sat Aug 17 14:50:06 2002 MDT)." "Last modified by Dax (#789) on Sat Aug 17 14:50:06 2002 MDT." .