x>=0.5 |2x-1|=2x-1
x<0.5 |2x-1|=-2x+1