$S{ var value=1.000004; var approx=numberFormat(value,"f",4); while (approx.charAt(approx.length-1)=='0' || approx.charAt(approx.length-1)=='.') approx=approx.slice(0,-1); approx; }