lua-users home
lua-l archive

Bug with math.log

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


Hello all!
Code:
for i=1,20 do
 if math.floor(math.log(2^i,2)) ~= i then
 print(i)
 end
end
will be output
3
6
12
13
if use math.log(2^i)/math.log(2) intstead all work correctly
lua 5.2.3

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