I remember an old post that I believe Voodoodog made about the quality of his metal bars compared to his coal and smelter. I'm not sure if that post was ever answered successfully and I'm not sure if it was posted in Bugs, How do I?!, or the Inn, so searching for it would be a pain. Anyway!
I believe the current smelting formula is simply the average of the coal and smelter Qualities, completely ignoring the Ore.
Thus: (C+S)/2 where C is the average of the coal in the fuel gauge and S is the smelter quality
I've updated the Ore Smelter wiki article with this information.