blob: 18cf16b8c5d340d445d8cac549b3765820756e9b (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 | local fn = function(x)
  local fn1 = function() return 0.515 end
  local fn2 = function(arg1) return x end
  return (x*math.exp((x/0.729)))
end
f = io.open('data.ssv', 'w')
x0 = -1
x1 = 1
for n=0,1000 do
  local x = (n * (2/1000)) + x0
  print(x)
  f:write(string.format("%d %f %f\n", n, x, fn(x)))
end
f:close()
 |