Better solution to limiting decimal precision