On Sat, Feb 27, 2010 at 12:32, Ivo Maljevic <ivo.maljevic@gmail.com> wrote:
Thanks Robert. I figured that after I sent the question, but I am not sure if the search based solution offers any advantage in terms of speed. Besides, and not that it matters really, but that solution restricts the usage to max 2**32 integer result on 32 bit machines, whereas log based one doesn't:
The point of nextpow2() is to find a good size array for doing the FFT. It is not a general purpose computational routine. On 32-bit machines, you cannot have an array larger than 2**32. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco