Well, here we go.here we go.
The currently accepted answer is wrong which is simply proven by the input (0.06f, 0.14f, 1). I explained the reason, I gave counterexamples and wrote much text why it cannot work reliably for binary floats.
My error was to bring up the issue in meta (normal meta, not stackoverflow meta) where I asked with incredible diplomatic skill (sarcasm) how we should react if we know that an answer is wrong.
People were quite impressed with my confidence and so I got three downvotes at Feb 2012 and one moderator even got so far to delete my answer later without my consent. I needed to go to meta to force him to take the deletion back.
For the answer itself: I am so convinced that it is impossible that I hereby bet 2000 points of my stackoverflow account if I cannot provide a counterexample to a function (less than 10k lines running on a real computer with limited resources, no memory to build gigantic tables) which parses two decimal arguments to floating-point and gives back the correct number of equal decimal significant figures for the two binary arguments and a given decimal fractional place.
The only upvote occured two years later, so it would have vanished for so long.