Why doesn't this produce the expected results:
?Int(4.123455 * (10 ^ 5) + 0.5)
produces: 412345
While:
4.123455*(10^5) +0.5
produces: 412346
I thought that the Int() function not supposed to round but "chop off" the fractional part of a number. But here, there is nothing to round - the result Prior to the Int() function is a Whole number!
Therefore, I get with:
x = (4.123455*(10^5) +0.5)
?Int(x)
a result of 412346
So, is this another unreliable VB function?
(PS. I know VB uses mathematical rounding - last digit must be an even number - but this shouldn't even need to round, the result prior to the Int() function is clearly a whole number)
?Int(4.123455 * (10 ^ 5) + 0.5)
produces: 412345
While:
4.123455*(10^5) +0.5
produces: 412346
I thought that the Int() function not supposed to round but "chop off" the fractional part of a number. But here, there is nothing to round - the result Prior to the Int() function is a Whole number!
Therefore, I get with:
x = (4.123455*(10^5) +0.5)
?Int(x)
a result of 412346
So, is this another unreliable VB function?
(PS. I know VB uses mathematical rounding - last digit must be an even number - but this shouldn't even need to round, the result prior to the Int() function is clearly a whole number)