lua-users home
lua-l archive

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


Hi,

Have I done something wrong with math.random?

$ luajit-2.0.0-beta1
LuaJIT 2.0.0-beta1 -- Copyright (C) 2005-2009 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE4.1 fold cse dce fwd dse narrow loop fuse
> =math.random()
1.7863937924312

LRM: "When called without arguments, returns a uniform pseudo-random real number in the range [0,1)"


$ uname -v
Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386
$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646)
$ lipo -info /usr/local/bin/luajit-2.0.0-beta1
Non-fat file: /usr/local/bin/luajit-2.0.0-beta1 is architecture: i386


Cheers,
Geoff