Christian Schulte wrote:
Dear Boriss,
I mentioned the issue before with random numbers, but here we go again:
never use modulo, use divison instead for scaling to the right range of
numbers. mod tends to not deliver good sequence of random numbers!
Sorry, I was not aware of this problem. thanks for pointing it out. But
is it just related to Mozart? or is it a mathematical problem in general?
cheers
Boriss
Christian
--
Christian Schulte, http://web.imit.kth.se/~schulte/
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Boriss Mejias
Sent: Monday, April 03, 2006 9:13 PM
To: Alan Oswald
Cc: [EMAIL PROTECTED]
Subject: Re: Generating Random Numbers
Hi Alan,
if you are working in the OPI, there is no need for importing that
library. Go to the Oz menu, and then Open Compiler Panel. In the
Environment you will see everything that is already load.
To generate a random number try
{Browse {OS.rand}}
that will be a random integer.
To generate a random number between 0 and 10, the usual stuff is
{Browse {OS.rand} mod 10}
cheers
Boriss
Alan Oswald wrote:
Jorge
Thenk you but when I try this in the OPI I get an "Illegal use of
nesting marker" error at line 1, column 0.
Alan
----------------------------------------------------------------------
--
____________________________________________________________________________
_____
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users
____________________________________________________________________________
_____
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users