T
Todd Heiks
Why is 'ans1' true if double and false for single?
Module Module1
Sub Main()
Dim x As Double / Single
Dim y As Double / Single
Dim ans1 As Boolean
Dim ans2 As Boolean
x = 0.3000000000000001
y = Math.Round(x, 2)
ans1 = y = 0.3
ans2 = Math.Round(y, 2) = 0.3
End Sub
End Module
Thanks
Module Module1
Sub Main()
Dim x As Double / Single
Dim y As Double / Single
Dim ans1 As Boolean
Dim ans2 As Boolean
x = 0.3000000000000001
y = Math.Round(x, 2)
ans1 = y = 0.3
ans2 = Math.Round(y, 2) = 0.3
End Sub
End Module
Thanks