added handling of precision for printing of floating point numbers