[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luajit bugs with big number. malformed number near '0x100000000000000000000'
- From: zhiguo zhao <zhaozg@...>
- Date: Sun, 20 Nov 2011 18:13:16 +0800
Your means ms makes this bug?
I not care below with lua 5.1.4,
> > i = 0x100000000000000 -- with 8 bytes, 64 bits
> > print(i)
> 4294967295
But I care below with luajit 2b8 head
Lua 5.1.4 Support 64bits int, but luajit support only 32bits.
D:\work\mod_luaex\etc>\work\luajit-2.0\bin\luajit.exe
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc fuse
> print(0x1000000000)
stdin:1: malformed number near '0x1000000000'
> print(0x10000000) only -- with 4 bytes, 32 bits
268435456
>
I hope not to require other math libs support 64bits integer.
2011/11/20 Mike Pall
<mikelu-1111@mike.de>
zhiguo zhao wrote:
> Why? integer too long?
>
> windows 32bits, msvc2008 build.
Support for hexadecimal floating-point numbers is a C99 feature.
MSVC is not C99-compliant, please complain to Microsoft.
> Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> > i = 0x100000000000000
> > print(i)
> 4294967295
Note that you're getting a wrong result with plain Lua. Would you
rather silently get a wrong result or a proper error message?
--Mike