allow variable precision in formatValue