lua-users home
lua-l archive

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

On September 6, 2010 at 7:36 AM Luiz Henrique de Figueiredo <> wrote:

> >  Since Lua is C89, here's a function dbltohex that converts a double to
> > a string just like the "%.13a" C99 specifier would do, and hextodbl to
> > convert the string back to a double.
> The code seems to assume IEEE 754, which is fine for current machines,
> but is not part of C89 (though it is part of C99).

Yeah, I forgot to mention that it assumes IEEE 754 though I didn't know it wasn't part of C89.

Well, we're thinking about using integers in all places until late in our pipeline where they'll be converted to floats.