[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.3.0 (work1) now available
- From: Enrico Colombini <erix@...>
- Date: Sat, 06 Jul 2013 17:04:19 +0200
On 06/07/2013 15.10, Luiz Henrique de Figueiredo wrote:
So 13/4 gives 3.25 and 13//4 gives 3. Also, 12/4 gives 3.0 and 12//4 gives 3.
>Also, does the integer support need any special build-time flag/option
No. And it cannot be disabled either.
So, for best efficiency, I guess programmers will have to be careful to
avoid unnecessary int -> fp conversions (assuming they are slow on
64-bit machines... I'm not really up to date).
Suppose I read a large number of values (some integer, some not) from a
text file into a table and then perform extensive computations on them.
Should I multiply each value by 1.0 (or add 0.0), to pre-convert all of
them to fp, to avoid slowing down the following computations compared to
A doubt: does math.floor return an fp value or an integer?
(the manual could be interpreted as the latter)
Lastly, I see no bit64 ops in the manual; will they come?
[I may have missed most of the discussion leading to integer support; I
apologize if this has already been discussed]