Not enough precision is provided when outputting non log-10 scale factors

For scale factors that are not log10 (not so common, but out there), the logic that calculates the number of digits of precision to use to print these as strings is insufficient.