Entered Value changes in a double type property.
In a double type property, if more than 16 digits are entered, the entered value changes on tab out.
In the property, On Change event with Post Value is configured in the Actions Tab.
Steps to Reproduce
- Create a double type Property.
- Configure On change Event with Post Value action in the actions tab.
- Enter more that 16 digits in the property and tab out of the property.
- It is observed that entered value is changing.
The behaviour is expected.
Since On Change event with Post Value is configured in the Actions Tab of the property rule, on tab out server interaction is happening and changes are seen on the screen.
the string 123456789123456784 is being represented as 1.23456789123456784E17
the string 9876543210987654321 is being represented as 9.876543210987655E18
The reason for this is that when representing both the above numbers in bits, may be for the first number, the 52bits are sufficient to represent the number as bits. Whereas for the second number the 52bits might not be sufficient, so the number is getting rounded off and then getting it accomodated in the 52bits.
But in both the cases the exponent value represents the total number of significant digits in the original number, the double number 9.876543210987655E18 is an approximation of the value 9876543210987654321
It is recommended to use Decimal type property instead of double property according to the user requirement (i.e. when user needs to use more than 16 decimal digits).