POV-Ray : Newsgroups : povray.general : random numbers : Re: random numbers Server Time
8 Aug 2024 06:20:01 EDT (-0400)
  Re: random numbers  
From: Ron Parker
Date: 7 Feb 2001 16:47:39
Message: <slrn983gk5.5lm.ron.parker@fwi.com>
On Wed, 7 Feb 2001 15:47:27 -0000, Tom Melly wrote:
>If it is a fixed sequence, how long is it?

The generator function is 

next_rand[stream] = next_rand[stream] * 1812433253L + 12345L;

which doesn't look particularly well-chosen to me.  But if it's done right,
I'd guess that the period is pretty large (i.e. at least 1812433253).  
Perhaps someone who's read volume 3 of Knuth more recently than I can 
confirm or deny.  Or perhaps I can dig out my copy of volume 3 and try to 
find a better PRNG for 3.5, since we've all seen some of the bad results 
you can get from the current one.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.