On Sunday, 12 April 2015 at 15:21:26 UTC, Johan Engelen wrote:

Sorry for not being clear.

I should have thought about it more before answering. :)

I understand why the current bsr behaves like it does, but what I meant is whether that is the desired behavior of bsr:
    bsr( byte(-1) ) == 31  (32-bit size_t)
    bsr( byte(-1) ) == 63  (64-bit size_t)
instead of
    bsr( byte(-1) ) == 7

I think 7 is the desired result.

I don't know whether there are uses for bsr with negative signed arguments since it returns the MSB position for all values.

Reply via email to