@westconn1
Your example is a different problem, that relates to calculation of floating point numbers.
This error is probably caused by hardward (CPU) and/or software (VB) due to the difficulty of conversion back and fort between decimal numbers and binary numbers (only the laters can be understanded by arithmetic processing unit).
There is no way to represent exactly 0.7 in binary system. With a certain number of bits used, it must have an error up to a known limit.
Code:? (0.07 * 100)=7 False ? CInt(0.07 * 100)=7 True ? CLng(0.07 * 100)=7 True ? CSng(0.07 * 100)=7 True ? CDbl(0.07 * 100)=7 False ? CDec(0.07 * 100)=7 True




Reply With Quote