std::to_string gives you no control over the format; you get the same result as sprintf with the appropriate format specifier for the type ("%f" in this case).
If you need more flexibility, then you will need a more flexible formatter - such as std::stringstream.