format ratios to %.4f