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:24 EDT (-0400)
  Re: Can someone research a stupid bug report for me?  
From: andrel
Date: 21 Sep 2007 04:27:40
Message: <46F3817C.9020901@hotmail.com>
Greg M. Johnson wrote:
> Warp wrote:
> 
>> 1812433253
> 
> Fascinating.  Makes me want to make up my own from now on.
> 
> Is something like newrand()=  mod (1000* sin( (0.5+0.5*newrand())*pi ) , 1)
> 
> less "predictable?  Can you think of something better? 
yes.
weakpoints are that it takes longer to compute than a standard random 
number generator but more importantly, is does not have a flat 
distribution. It is not as bad as I expected (see attached greg1.png) 
but not good enough. I think it is because if your number is close to 1, 
the next will also be. And you can get there by accident, so that is 
probably why there is that peak close to 1. Removing the pi from your 
equation helps a lot. I don't feel like doing a more complete analysis now.


Post a reply to this message


Attachments:
Download 'greg1.png' (4 KB) Download 'greg2.png' (5 KB)

Preview of image 'greg1.png'
greg1.png

Preview of image 'greg2.png'
greg2.png


 

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