I have a data which is changing
Example:
value |
0.009892 |
when I am clicking it twice the original value which is 0.0098125347 comes to the result tab
I want it to be
Output:
Value |
0.009891 |
How can I change it
If the field's data type is Double, you may be noticing the joy of floating point numbers.
Floating-point numbers: how computers store numbers: they use base-2, and base-2 cannot represent "some" base-10 decimals. This leads to simple decimal numbers appearing differently or rounding differently than expected.
The only way to correct this is to stick with integer math, as all base-10 integers can be represented correctly in base-2.
I created the attached Word document with all of the information I've seen on the topic, including Solutions for things like "round to 1 decimal place", "round to 2 decimal places".
Chris
@ChrisTX Still could not figure out the solution from the docs
Did you try
round to 1 decimal place
FLOOR(Round(Round([MyNumber], .0001), .1) * 10 ) / 10
or
ROUND([MyNumber] + 0.00000001, 0.1)
and adjust the formulas for the number of decimal places you want?