Dang I did not know Integer division was a problem! (Giving results unexpected like CINT and CLNG which I never use anyway)
Round2 gives me results I'd prefer as expected, has this been proposed before? (expected round up on .5 or down if negative)
I vaguely remember some conversation about rounding and Luke mentioning that rounding in QB64 was like bankers way of rounding .5's so that a balance of them doesn't accumulate a significant plus amount.
Round2 gives me results I'd prefer as expected, has this been proposed before? (expected round up on .5 or down if negative)
Code: (Select All)
For i = -5 To 5 Step .5
Print i, round2&(i), _Round(i)
Next
Function round2& (x)
If x < 0 Then round2& = -1 * Int(-x + .5) Else round2& = Int(x + .5)
End Function
I vaguely remember some conversation about rounding and Luke mentioning that rounding in QB64 was like bankers way of rounding .5's so that a balance of them doesn't accumulate a significant plus amount.
b = b + ...