[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: tostring vs. nan, inf
- From: Alexander Gladysh <agladysh@...>
- Date: Tue, 10 Apr 2012 15:38:29 +0400
On Tue, Apr 10, 2012 at 14:58, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> As opposed to other numbers, for inf and nan tostring() returns values
>> that Lua can not read back:
>
> In Lua 5.1 can convert "inf" and "nan" with tonumber. (But not in Lua 5.2.)
>
>> one can simply define them as global variables
>
> This seems to me to be a good compromise if you want to convert those
> values frequently.
Wouldn't work for Windows ( 1.#INF) with stock Lua.
Alexander.