in case of big double values buf * 10000 causes type overflow.