Mersenne twister dll
Posted: Thu Aug 24, 2006 8:44 am
				
				Hades or anyone,
how does one call that MT dll in PB.
I am really needing to generate good random numbers between a range (say between minnumber=250 and maxnumber=500).
I tried simply writing a subroutine that tested Random(maxnumber) and spits out an answer when it gets one between say 250 and 500.
However, because Random() is really running between 0 and 500 and is relatively unbiased as far as I can tell, it actually spits out far too many too close to 150 and my result is therefore biased too low.
In the real program its actually a water demand (litres/person/day) and is accumulated daily over say 150 years!.
If I don't include the random subroutine and simply do the 500 value the accumulated demand is around twice that when the random routine chooses between 75% and 100% (ie between 375 and 500). Thats not correct. it appears the values are far too close to the 375 when the number is spat out of the subroutine
any help mucho grando apprecioso!
Dan Raymond
			how does one call that MT dll in PB.
I am really needing to generate good random numbers between a range (say between minnumber=250 and maxnumber=500).
I tried simply writing a subroutine that tested Random(maxnumber) and spits out an answer when it gets one between say 250 and 500.
However, because Random() is really running between 0 and 500 and is relatively unbiased as far as I can tell, it actually spits out far too many too close to 150 and my result is therefore biased too low.
In the real program its actually a water demand (litres/person/day) and is accumulated daily over say 150 years!.
If I don't include the random subroutine and simply do the 500 value the accumulated demand is around twice that when the random routine chooses between 75% and 100% (ie between 375 and 500). Thats not correct. it appears the values are far too close to the 375 when the number is spat out of the subroutine
any help mucho grando apprecioso!
Dan Raymond
