X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fcalc;h=f76472f00ef56512a0a873b78ca5dd99add244f4;hb=78ed4e167ea4bf3ba1b03cc64ea02e6d4184cf77;hp=9fa35d378dab8a69f508cf2529c04a29aded4a18;hpb=3927146f162200e2cd7f1733a0a8dbcd60da46bf;p=config%2Fdotfiles.git diff --git a/bin/calc b/bin/calc index 9fa35d3..f76472f 100755 --- a/bin/calc +++ b/bin/calc @@ -23,6 +23,8 @@ from math import * def ld(x): return log(x)/log(2) +def lg(x): + return log10(x) def binom(n,k): return reduce(lambda a,b: a*(n-b)/(b+1),xrange(k),1)