Re: Very odd representation of constant 2e19

  • From: malkia <malkia@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 28 Jul 2015 14:03:43 -0700

Happens on my machine too, but the Ubuntu luajit installation is
possibly quite old:

Fetched 276 kB in 0s (304 kB/s)
Selecting previously unselected package libluajit-5.1-common.
(Reading database ... 365952 files and directories currently installed.)
Preparing to unpack .../libluajit-5.1-common_2.0.2+dfsg-1_all.deb ...
Unpacking libluajit-5.1-common (2.0.2+dfsg-1) ...
Selecting previously unselected package luajit.
Preparing to unpack .../luajit_2.0.2+dfsg-1_amd64.deb ...
Unpacking luajit (2.0.2+dfsg-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libluajit-5.1-common (2.0.2+dfsg-1) ...
Setting up luajit (2.0.2+dfsg-1) ...
$ luajit
LuaJIT 2.0.2 -- Copyright (C) 2005-2013 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse

2e19<2e18
stdin:1: unexpected symbol near '2e19'
2e19
stdin:1: unexpected symbol near '2e19'
=2e19 < 2e18
true
=1<2
true
=1<3
true
=1<1
false
print(2e19)
1.5532559262904e+18
print(2e18)
2e+18> ^C
$ apt-cache show luajit
Package: luajit
Version: 2.0.2+dfsg-1
Installed-Size: 477
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@xxxxxxxxxxxxxxxx>
Original-Maintainer: Enrico Tassi <gareuselesinge@xxxxxxxxxx>
Architecture: amd64
Depends: libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libluajit-5.1-common
(= 2.0.2+dfsg-1)
Pre-Depends: multiarch-support
Description: Just in time compiler for Lua programming language version 5.1
LuaJIT implements the full set of language features defined by Lua 5.1. The
virtual machine (VM) is API- and ABI-compatible to the standard Lua interpreter
and can be deployed as a drop-in replacement.
.
This package contains the standalone interpreter/jitter that can be used
as a replacement for the standard lua5.1 interpreter.
Description-md5: ea2ed48b1a4e9f9a88708b90989b759f
Multi-Arch: foreign
Homepage: http://luajit.org
Filename:
pool/luajit_2.0.2+dfsg-1_amd64_2ae346e1a8007297518c949c499bdcf1d95b1c3ed331813648e18faa13c0b372.deb
Priority: optional
SHA256: 2ae346e1a8007297518c949c499bdcf1d95b1c3ed331813648e18faa13c0b372
Section: interpreters
Size: 234244




On Tue, Jul 28, 2015 at 1:45 PM, soumith <soumith@xxxxxxxxx> wrote:


On Tue, Jul 28, 2015 at 10:39 PM, Pedro Tabacof <tabacof@xxxxxxxxx> wrote:


I hope I'm not going crazy and doing something incredibly dumb. I'm using
Windows by the way.


Cannot reproduce on OSX or Linux (LuaJIT 2.1alpha)

=2e19
2e+19

=2e19 < 2e18
false

=2*10^19
2e+19




--
Dimiter "malkia" Stanev,
ICQ: 21875894
malkia@xxxxxxx
malkia@xxxxxxxxx

Other related posts: