Upon exploring a problem with our software we ran into an anomly that none of us understand.
Using this code - all I am doing is adding .001 to .001 an so on. Looks that simple right?? If you run the code it will start generating numbers like: 6.000001E-03
Can anyone explain this or have a fix for this??
Thanks,
Brandon
Using this code - all I am doing is adding .001 to .001 an so on. Looks that simple right?? If you run the code it will start generating numbers like: 6.000001E-03
Can anyone explain this or have a fix for this??
Thanks,
Brandon
Code:
Sub Main()
Dim TestArray(1000) As Single
Dim i As Integer
TestArray(0) = 0.001
For i = 1 To 999
TestArray(i) = TestArray(i - 1) + 0.001
Next i
End Sub