Reputation: 592
When I try to bind decimal value greater than 17 digits in length to knockout observable property, I am facing uneven behaviour of knocukout.
Explanation of issue: We are entering 12345678987654321 value with decimal at different places.
Case 1 : if value is 123456789.87654321 it results = 123456789.87654321
Case 2 : if value is 1234567.8987654321 it results = 1234567.8987654322
Case 3 : if value is 12345678.987654321 it results = 12345678.98765432
Case 4(without decimal) : if value is 12345678987654321 it results = 12345678987654320.
Please see the comments for the JS fiddle link.
Any suggestions? or any Javascript or any knockout property we can apply to avoid this uneven behaviour?
Upvotes: 2
Views: 503