Factor out commonalities in formatting floats.

library/string.format.m:
    As above.