Changed to using sprintf, simplified extracting dc and shortened return

Just shortened a little more.