function [res]=logp(x)
res=sign(x)*log(abs(x));