Functions to round a number to a specified precision.