Rounding with decimals
I can't find a way to round a number to a specific number of decimals. So e.g. 3.14159 to 3.1416 or 3.14
I'm surely missing something. Any ideas where to find that function?
I can't find a way to round a number to a specific number of decimals. So e.g. 3.14159 to 3.1416 or 3.14
I'm surely missing something. Any ideas where to find that function?
Hi Chris,
We use round, but have to extend the number past the decimal range first because our round() feature only rounds to the nearest integer.
Using this method on 3.14159 i get
The formulas to handle this look like this:
So, again , you round the number multiplied by the factor of the digits you want then divide the newly rounded integer by the same factor
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.