[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Using float data type throughout Lua 4.0 source
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 11 Mar 2002 14:12:30 -0300
>I've already defined LUA_NUM_TYPE as float, but there are plenty of doubles that this leaves behind. I've defined a lua_Number type and replaced all remaining doubles with this (I know there's already a Number type, but wanted the "lua_" in front for the API defs).
This has been been fixed in 4.1w.
>My question: Is this safe?
Probably. The only thing you mught want to check is whether strtod is
supported by your compiler or if there is strtof (there isn't in ANSI C).
>Does anyone familiar with these files know what will happen if ints are not represented precisely by the floats?
I don't think the code ever assumes that ints fit into a Number. I think it
only uses small ints that should fit.
--lhf