/[gzz]/manuscripts/Sigs/poss.py
ViewVC logotype

Diff of /manuscripts/Sigs/poss.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by benja, Sun May 18 19:37:42 2003 UTC revision 1.7 by tjl, Sun May 18 19:47:11 2003 UTC
# Line 2  from fractions import fraction Line 2  from fractions import fraction
2  import math  import math
3  from math import log, log10, ceil  from math import log, log10, ceil
4    
5    def fact(x):
6        return reduce(lambda a, b: a*b, range(1, x+1), 1L)
7    
8    def choose(n, k):
9        return fact(n) / (fact(k)*fact(n-k))
10    
11  def lamport(h, b):  def lamport(h, b):
12      return (1, b, b*h, 2*b*h, h, 2*b, 0, b)      return (1, b, b*h, 2*b*h, h, 2*b, 0, b)
13    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26