From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2003-01-24 14:10:13


On Fri, 24 Jan 2003 12:55:56 +0200, "Vesa Karvonen"
<vesa_karvonen_at_[hidden]> wrote:

>Gennaro Prota:
>>Vesa, I really appreciate your attempt but your code assumes the
>>required number to be a power of two (it just tries 32, 64, 128,
>>etc.). What about 48 bits unsigned long?[...]
>
>If unsigned long has 48 bits, then an n of 32 would be chosen.

And then you are not able to calculate log2 for numbers in the range
[2**32, 2**48-1[ (at least).

[...]
>3) if you want to allow other than powers of two in the core algorithm, and
>especially if you want to make it possible to save the one recursion...

Yes, I actually missed that this is an assumption for the core
implementation too :-( I don't think that's acceptable for boost code.

I want to see if with the necessary modifications the resulting code
has still a better combination of simplicity and speed than the
current one but I don't have enough time right now. I'll let you know
as soon as I'll have something to present here.

Thanks,
Genny.