Here's my test code:
Dim testSingle As Single = 7.2
Dim testSingleF As Single = 7.2F
Dim testDouble As Double = 7.2
If testSingle = testDouble Then ' this is false
Label1.Text = "true"
Else
Label1.Text = "false"
End If
If testSingleF = testDouble Then ' this is false
Label2.Text = "true"
Else
Label2.Text = "false"
End If
If testSingle = 7.2F Then ' this is true
Label3.Text = "true"
Else
Label3.Text = "false"
End If
As you can see by my comments, the first two statements are false, and the third is true. Why is that? The precision shouldn't matter as it's such a small number.
What's going on here?