Format doubles directly into the output buffer when possible