Linear congruential generator: Difference between revisions
m
→{{header|Julia}}
m (→{{header|Phix}}: bigatom -> mpfr) |
|||
Line 1,598:
=={{header|Julia}}==
<tt>getlgc</tt> creates a linear congruential generator as a closure. This function is used to create the two generators called for by the task.
<lang julia>using Printf
<lang julia>function getlgc(r::Integer, a::Integer, c::Integer, m::Integer, sh::Integer)▼
state = r
return function lgcrand()
|