I seem to remember something about 32,767 or 32,768 being involved in this
somewhere.  Not being a math major, but this is a 8 bit number which I
believe is the max for the RND function.  You will have to add some other
mathematics to reach your 370570.


Tom Dodds
[EMAIL PROTECTED]
630-235-2975 Cell
708-482-4510 Office
 


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Barry Brevik
Sent: Wednesday, November 10, 2004 1:03 PM
To: U2-users (E-mail)
Subject: [U2] [UV] Random number (RND()) help


UV 9.6.1.3 on NT.
I needed to generate some random numbers between 0 and 370570, and just to
check the distribution of numbers, I ran this snippet of code:

FOR I = 1 TO 999999
  THIS.NUM = RND(370570)
NEXT

What's odd is that no matter how many times I run this, the distribution of
numbers is always completely in the lower 10% of the range (approx). In
other words, there are never any numbers generated higher than ~ 33,000.

Am I doing something stupidly wrong?

Barry
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to