math.random ([m [, n]])
This function is an interface to the simple pseudo-random generator function rand provided by ANSI C. (No guarantees can be given for its statistical properties.)
When called without arguments, returns a uniform pseudo-random real number in the range [0,1). When called with an integer number m, math.random returns a uniform pseudo-random integer in the range [1, m]. When called with two integer numbers m and n, math.random returns a uniform pseudo-random integer in the range [m, n].
--------------------------------------------------------------------------------
math.randomseed (x)
Sets x as the "seed" for the pseudo-random generator: equal seeds produce equal sequences of numbers.
--------------------------------------------------------------------------------
math.sin (x)
Returns the sine of x (assumed to be in radians).
--------------------------------------------------------------------------------
math.sinh (x)
Returns the hyperbolic sine of x.
--------------------------------------------------------------------------------
math.sqrt (x)
Returns the square root of x. (You can also use the expression x^0.5 to compute this value.)
--------------------------------------------------------------------------------
math.tan (x)
Returns the tangent of x (assumed to be in radians).
--------------------------------------------------------------------------------
math.tanh (x)
Returns the hyperbolic tangent of x.
5.7 - Input and Output Facilities
The I/O library provides two different styles for file manipulation. The first one uses implicit file descriptors; that is, there are operations to set a default input file and a default output file, and all input/output operations are over these default files. The second style uses explicit file descriptors.
When using implicit file descriptors, all operations are supplied by table io. When using explicit file descriptors, the operation io.open returns a file descriptor and then all operations are supplied as methods of the file descriptor.
The table io also provides three predefined file descriptors with their usual meanings from C: io.stdin, io.stdout, and io.stderr. The I/O library never closes these files.
Unless otherwise stated, all I/O functions return nil on failure (plus an error message as a second result and a system-dependent error code as a third result) and some value different from nil on success.
--------------------------------------------------------------------------------
io.close ([file])
Equivalent to file:close(). Without a file, closes the default output file.
--------------------------------------------------------------------------------
io.flush ()
Equivalent to file:flush over the default output file.
--------------------------------------------------------------------------------
io.input ([file])
5. Standard libraries
Start from the beginning
