The code you wrote was:
x=x-0.25718;// take 257.16 divide 50 mm divide 20

which is equal to x=x-dxm/20.;  for your case (20 smaller division). ;)