lua-users home
lua-l archive

Re: bug in ceillog2 macro (Lua-5.1.4)

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Jan 7, 2011 at 10:39, Axel Kittenberger <axkibe@gmail.com> wrote:
> ceillog of 0.5 is -1
> ceillog of 0.25 is -2
> ceillog of 0.125 is -3
> etc
>
As it stands now
ceillog2(1) is 0
ceillog2(0) is 32 (should be -infinity or 0 depending on point of view)
I though to use (ceillog2(x) % 32) but it gets issues of its own.
I think the best thing to do is just ignore the issue and remember
that any function with "log" as part of its name does not like 0 as
input.
--Leo--

AltStyle によって変換されたページ (->オリジナル) /