Random number generator (included): Difference between revisions

added Elixir
No edit summary
(added Elixir)
Line 204:
=={{header|DWScript}}==
DWScript currently uses a 64bit [[wp:Xorshift|XorShift]] PRNG, which is a fast and light form of GFSR.
 
=={{header|Elixir}}==
Elixir does not come with its own module for random number generation. But you can use the appropriate Erlang functions instead. Some examples:
<lang elixir>
# Seed the RNG
:random.seed(:erlang.now())
 
# Integer in the range 1..10
:random.uniform(10)
 
# Float between 0.0 and 1.0
:random.uniform()
</lang>
For further information, read the Erlang section.
 
=={{header|Erlang}}==
Anonymous user