write fraction if it is shorter than the decimal