3 local n
, i
, s
, e
, d
= ...
5 if n
=='-h' or n
=='--help' then
7 usage: ]]..arg
[0]..[[ <n> <i> <s> <e> <d>
8 <n> (default 20) Number of spins
9 <i> (default 1000000) Iterations for each value of alpha
10 <s> (default 0.1) starting value of alpha
11 <e> (default 0.4) final value of alpha
12 <d> (default 0.01) stepping value of alpha
17 n
= tostring(tonumber(n
) or 20)
18 i
= tostring(tonumber(i
) or 1000000)
19 s
= tonumber(s
or 0.22)
20 e
= tonumber(e
or 0.22)
21 d
= tonumber(d
or 0.01)
25 a
= string.format('%.3f', a
)
26 print('==== '..t
..' alpha = '..a
..' ====')
27 os
.execute('time ./'..t
..' -M -l 100 -n '..n
..' -i '..i
..' -a '..a
..' -o raw-'..a
..'.'..t
)