POV-Ray : Newsgroups : povray.off-topic : Can someone research a stupid bug report for me? : Re: Can someone research a stupid bug report for me? Server Time
11 Oct 2024 17:47:58 EDT (-0400)
  Re: Can someone research a stupid bug report for me?  
From: Orchid XP v3
Date: 22 Sep 2007 03:06:46
Message: <46f4bf06$1@news.povray.org>
Warp wrote:
> Orchid XP v3 <voi### [at] devnull> wrote:
>> OOC, are the coeficients for POV-Ray's generator from a book or where 
>> they just chosen arbitrarily?
> 
>   Unlikely to be arbitrary because, IIRC, the period is 2^32. (In other
> words, it goes through the entire range of 32-bit values before repeating.)

Right. There's some kind of algorithm for picking LCG coefficients such 
that they have this property. (I have no idea what the algorithm is.)

So even though you get uniformly distrubuted numbers in 0 .. 1, POV-Ray 
is actually generating integers and converting them? Presumably that 
means no two random numbers can differ by less than 2^-32?

-- 
http://blog.orphi.me.uk/


Post a reply to this message

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