fixed bug with max(x,0), min(x,0), and pow(x,-1)