Format a double, optionally with another char (like i or j). If char is the default NUL (ASCII 0), it is not part of the result string.