I am wondering about this behavior that I see in VBA. I am using the Immediate console to debug my code and got the following result:
Debug.Print(Int(0.00024575*10000000+0.5))
2457
I would expect this result to be 2458
. Does anyone know why this is occurring? As expected, before the Int
function is called, the calculation is in Double precision.
Debug.Print(VarType(0.00024575*10000000+0.5))
5
Any help is greatly appreciated!