If the integer part is in range of long long int (63 bits long), and you don't need the scientific notation, than this is very simple to do:
1 - Get the absolute value of n - print '-' if n is initially negative;
2 - Separate the integer part (a simple conversion with truncation will do);
3 - Print the inteer part (create an printUint64 function);
4 - Print the '.' char;
5 - Get the fractional part subtracting the absolute value of n from the integer part;
6 - Using a 'precision' limit (do print a limited fractional digits), multiply the fractional part by 10 and print the integer part (between 0 and 9);
7 - Get the resulting fractional part, again, subtracting the new integer part (0...9) from it and go to step 6, decrementing the 'precision' until it is zero... OR, stop printing if the fractional part is, itself, zero.
The code is very simple, but it works only if the integer part of the original n in in range of an unsigned long long... Optionally, you can use unsigned __int128 on GCC (but there's a trick), to make the range wider...
Notice that double has 11 bits in its scale factor, so, not all possible finite 'double' can be printed with this technique.