Linear congruential generator: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: bigatom -> mpfr) |
|||
Line 1,598: | Line 1,598: | ||
=={{header|Julia}}== |
=={{header|Julia}}== |
||
{{works with|Julia|0.6}} |
|||
<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. |
<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 |
|||
⚫ | |||
⚫ | |||
state = r |
state = r |
||
return function lgcrand() |
return function lgcrand() |