We found strange issue during simple calculations. When trying to calculate:
1089.11 + 97.63 - 1186.74
we are receiving:
but this value shoud be 0 (zero). Please try the following in your CF:
#1089.11 + 97.63 - 1186.74# (should be 0)<br />
#1079.11 + 97.63 - 1176.74# (should be 0)<br />
#1079.11 + 107.63 - 1186.74# (should be 0)<br />
#1189.11 + 97.63 - 1286.74# (should be 0)<br />
#1089.11 + 97.63 - 1186.64# (should be 0.10)<br />
#2089.11 + 97.63 - 2186.74# (should be 0)<br />
#3089.11 + 97.63 - 3186.74# (should be 0)<br />
It's strange and we are not sure how to deal with this issue. Of course we can use Round, we can use some other methods, but we don't want to review all our applications to check if such situation occured...
google Floating Point Arithmetic rounding errors, this is a common problem
OK, now it's clear - there is a problem during conversion to binary (binary floating point number).
We have to implment additional security here and there...