I am trying to understand the errors that seem to occur when working with numbers in VB. For example, run the little program below and look at the contents of the Immediate window. Once the program gets to 4.015, it adds a very small number to yield 4.01500000000001. Where does this number come from?
Option Explicit
Dim temp1 As Double
Private Sub Form_Load()
For temp1 = 4 To 4.199 Step 0.001
Debug.Print temp1
Next temp1
End Sub
Thanks in advance.......BluesMatt
