random number including 1 - i.e. [0,1]

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sun Jun 14 05:38:59 EDT 2009


In message <mailman.1368.1244607807.8015.python-list at python.org>, Esmail 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)

Are the terms meant to be clamped to a particular range of values? Otherwise it probably doesn't matter.




More information about the Python-list mailing list