root/hodgestar/PythonCode/SmallScripts/bentleysaxe.py

Revision 375, 219 bytes (checked in by simon, 4 years ago)

Miscellaneous small scripts.

  • Property svn:mime-type set to text/python-source
  • Property svn:eol-style set to native
Line 
1from random import random
2
3def dscRand(iN):
4    fMax = 1.0
5    for i in range(iN,0,-1):
6        fMax = fMax*random()**(1.0/i)
7        yield fMax
8       
9def ascRand(iN):
10    for f in dscRand(iN):
11        yield 1.0 - f
Note: See TracBrowser for help on using the browser.