lua-users home
lua-l archive

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


Hi,

Chris wrote:
> I'll look into the 0x parsing and see what the issue is.

MSVCRT is (still) not C99 compliant and cannot parse hex
floating-point numbers with strtod(). So the fallback with
strtoul() kicks in and (obviously) fails for hex numbers which do
not fit into a long (32 bit on WIN32). Complain to M$.

Since strtod() from glibc is C99-compliant, the problem does not
arise on Linux (and most other OS). I.e you get hex numbers with
full FP number precision.

The behaviour of number parsing and output is system dependent
because Lua uses the library functions provided by the toolchain.
This makes sense because some implementations need more lines of
code for this task than Lua itself. ;-)

Bye,
     Mike