X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fcalc;h=f76472f00ef56512a0a873b78ca5dd99add244f4;hb=d230a7af7a4d66f5311a3e7edcae18e7643cb134;hp=9fa35d378dab8a69f508cf2529c04a29aded4a18;hpb=88997f09e4b2e6ce41c374495af0818036a2d627;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)