def plexp(x,xm=<NUM_LIT:1>,a=<NUM_LIT>):
C = <NUM_LIT:1>/(-xm/(<NUM_LIT:1> - a) - xm/a + math.exp(a)*xm/a)<EOL>Ppl = lambda X: <NUM_LIT:1>+C*(xm/(<NUM_LIT:1>-a)*(X/xm)**(<NUM_LIT:1>-a))<EOL>Pexp = lambda X: C*xm/a*math.exp(a)-C*(xm/a)*math.exp(-a*(X/xm-<NUM_LIT:1>))<EOL>d=Ppl(x)<EOL>d[x<xm]=Pexp(x)<EOL>return d<EOL>
CDF(x) for the piecewise distribution exponential x<xmin, powerlaw x>=xmin
This is the CDF version of the distributions drawn in fig 3.4a of Clauset et al.