[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bug ? math.tointeger strange behavior
- From: "Soni L." <fakedme@...>
- Date: Mon, 9 May 2016 12:39:44 -0300
On 09/05/16 12:35 PM, Loïc Le Cunff wrote:
Pick a rounding behaviour. math.tointeger only converts to integer if x
% 1.0 == 0.0.
Lately I've been messing around with this function, but sometimes my
software (using results from lua scripts) would crash. I've isolated
an example of this issue demonstrated in this simple script:
At first I thought it could be related to Windows (stuff built with
TDM-GCC 5.1), but I could also replicated it on a Mint virtual machine
I've seen it both in lua 5.3.0 and 5.3.2.
Note that more often than not math.tointeger behaves properly, but in
this particular case it just doesn't.
Can anyone replicate this or is the issue only on my side?
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.