I suspect from your description that the argument for RND() is a signed Small 
Integer (0 through 32767).
Don't know why this is.  Manual doesn't seem to help.  Ask IBM.
Workaround is something like 32768 * Rnd(32767) + Rnd(32767).

----- Original Message -----
From: Barry Brevik <[EMAIL PROTECTED]>
To: "U2-users (E-mail)" <[EMAIL PROTECTED]>
Subject: [U2] [UV] Random number (RND()) help
Date: Wed, 10 Nov 2004 11:03:09 -0800

> 
> 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