fix various floating point rounding and formatting errors in *printf