# numeric computation; n(integrate(y_,x_,a_,b_)) := If(isnumber(a) and isnumber(b), nint(y,x,a,b)); n(solve(y_,x_)):=nsolve(y,x); n(lim(y_,x_=a_)):=nlim(y,x,a); n(a_ and b_):=n(a) and n(b); n(a_+b_):=n(a)+n(b); n(a_*b_):=n(a)*n(b); n(psi(n_,x_)) := if(n>0,(-1)^(n+1)*n!*zeta(n+1,x)); n(Beta(p_,q_)) := gamma(p)*gamma(q)/gamma(p+q); #n(zeta(n_,x_)):=If(isnumber(x), If(n<0, beta(1-n,x)/(1-n), If(n>0 and isinteger(n), (-1)^(-n)*psi(n-1,x)/gamma(n) ))); n(erfi(p_,x_)):= If(abs(p)<= 1, -(-2)^p*gamma((p+1)/2,-x^2)/sqrt(3.1416) ); n(erf(n_,x_)):= If(abs(n)<= 1, -(-2)^n*gamma((n+1)/2,x^2)/sqrt(3.1416), n(gamma(n)*(gamma(1/n)-gamma(1/n,x^n))/sqrt(3.1416)) ); n(sinh(n_,x_)):=exp(x)/2-exp(-x)*(-1)^n/2; n(cosh(n_,x_)):=exp(x)/2+exp(-x)*(-1)^n/2; n(ln(n_,x_)):= n((log(x)+psi(1)-psi(1-n))/gamma(1-n)/x^n); n(inversePhi(x_)):= 1.414*n(inverseerf(2x-1)); n(inverseerf(x_)):=sgn(x)*sqrt(sqrt((2/3.1415/0.147+log(1-x^2)/2)^2-log(1-x^2)/0.147)-2/3.1416/0.147-log(1-x^2)/2); n(erfi(x_)):= If(iscomplex(x) and re(x)==0, i*erf(im(x)), If(isnumber(x), nint(exp(t^2),t,0,x)*1.12838) ); n(Phi(x_)):= 1/2+erf(x/sqrt(2))/2; n(Phi(a_,x_)):= erf(x/sqrt(2))/2-erf(a/sqrt(2))/2; n(gauss(x_)):= n(1/sqrt(2)*e^((-1/2)*x^2)*pi^(-1/2)); #n(li(x_)):= nint(1/log(t),t,0.0001,x); n(theta(x_)):=(sgn(x)+1)/2; n(sqrt(x_)):=if(x<0, abs(x)^0.5*i); n(log(x_)):= If(x<0, log(-x)+pi*i ); n(acosh(x_)):= If(x<0, acosh(-x)+pi*i ); n(polar(a_,b_)):=n(a*exp(b*i));