On Jun 9, 11:23 pm, Esmail <ebo...@hotmail.com> wrote: > Here is part of the specification of an algorithm I'm implementing that > shows the reason for my original query: > > vid = w * vid + c1 * rand( ) * ( pid – xid ) + c2 * Rand( ) * (pgd –xid ) (1a) > > xid = xid + vid (1b) > > where c1 and c2 are two positive constants, > rand() and Rand() are two random functions in the range [0,1], > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > and w is the inertia weight.
It is entirely possible that the documentation you have for the original rand() and Rand() functions have misstated their range. In my experience, rand() functions that I have worked with have always been [0,1). -- Paul -- http://mail.python.org/mailman/listinfo/python-list