# log(x) is natural log of base e;
# log(x,n) is log(x) of base n;
# expand(log(a_*b_)) := log(a)+log(b);
# expand(log(a_^b_)) := b*log(a);
log(a_=b_) := log(a)=log(b);
log(a_^b_) := if(a>0,b*log(a));
#log(-1):=pi*i;
log(1):=0;
log(e):=1;
log(1/x_):= -log(x);
log(exp(x_)) := x;
log(e^(x_)) := x;
log(x_,a_):=log(x)/log(a);