lkml.org 
[lkml]   [2011]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] include/log2.h: Fix rounddown_pow_of_two(1)
    From
    Date
    On Tue, 2011-12-13 at 21:00 +0100, Peter Zijlstra wrote:
    > On Mon, 2011-12-12 at 10:02 -0800, Dmitry Torokhov wrote:
    > > 1 is a power of two, therefore rounddown_pow_of_two(1) should return 1.
    >
    > x^0 = 1
    > x^1 = x
    >
    > Seems to me 0 was the right answer, no?

    n/m head-up-arse, missed that this wasn't actually a log variant.


    \
     
     \ /
      Last update: 2011-12-13 21:09    [W:5.818 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site