mt_rand

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oliver Benning

    mt_rand

    Happy New Year!

    is there a way to save the internal position of the mersenne twister
    (mt_rand) at the end of the php script (i.e. to session or database) and
    start it again using the last generated number?

    If not, do you know a opensource php version of the mersenne twister?

    Regards,
    Oliver

  • Philip Ronan

    #2
    Re: mt_rand

    In article <dp912i$f7h$00$ 1@news.t-online.com>,
    "Oliver Benning" <oliver@treibha us.ping.de> wrote:
    [color=blue]
    > is there a way to save the internal position of the mersenne twister
    > (mt_rand) at the end of the php script (i.e. to session or database) and
    > start it again using the last generated number?[/color]

    Probably not.
    [color=blue]
    > If not, do you know a opensource php version of the mersenne twister?[/color]

    It shouldn't be difficult to adapt one of these:
    <http://www.math.sci.hi roshima-u.ac.jp/~m-mat/MT/VERSIONS/eversions.html>

    --
    philronan [@] blueyonder [dot] co [dot] uk

    Comment

    Working...