nValue = 234.8234721345 LOCAL decPortion, itterationCtr itterationCtr = 0 decPortion = nValue - INT(nValue) DO WHILE INT(decPortion) < decPortion decPortion = decPortion * 10 itterationCtr = itterationCtr + 1 ?decPortion ENDDO ? itterationCtr... and the output starts like ...
8.2347213450
82.3472134500
823.4721345000
8234.7213450001
82347.2134500008
823472.1345000083
8234721.4560000830
You can run it & see how it ends from there, but the interesting part begins on the 4th element of output. All I am doing is multiplying the number by 10. Why does 823.4721345000 * 10 get me 8234.7213450001? I'm assuming it has SOMETHING to do w/ mathematical precision, but if I just type in?823.4721345000 * 10outside of this looping logic, it returns the CORRECT value w/o that '1' tacked onto the end of it. Does anyone have any thoughts or insights on this?