LCSims
19-03-2015, 05:07
Hello to all,
So I'm still around and working, though at a much slower pace and with similar results. I have a situation that confuses my worn-out brain and hope someone might shed some light on the results of the below;
Dim num1 As Double Value = 28.144074074073
Dim div1 As Double Value = 2.8125
Dim result1 As Integer
Dim result2 As Double
result1 = num1 \ div1
result2 = num1 / div1
MsgBox 0, result1 + $CRLF + result2
When using Operator (/) I'm expecting to see 10, but am getting 9. Doing 10 x 2.8125 = 28.125, which goes into num1 10 times and change. But I'm getting 9. Why am I getting 9?!?
I don't have any ideas. I can work around it, if I know why it's giving me 9. At least I hope I can??? :D
And the thread title is in recognition to Jethro Bodine of The Beverly Hillbillies and him learning about math, specifically division. As in 4 gazinta 12 three times, 5 gazinta 30 six times...
Thanks for any assistance.
So I'm still around and working, though at a much slower pace and with similar results. I have a situation that confuses my worn-out brain and hope someone might shed some light on the results of the below;
Dim num1 As Double Value = 28.144074074073
Dim div1 As Double Value = 2.8125
Dim result1 As Integer
Dim result2 As Double
result1 = num1 \ div1
result2 = num1 / div1
MsgBox 0, result1 + $CRLF + result2
When using Operator (/) I'm expecting to see 10, but am getting 9. Doing 10 x 2.8125 = 28.125, which goes into num1 10 times and change. But I'm getting 9. Why am I getting 9?!?
I don't have any ideas. I can work around it, if I know why it's giving me 9. At least I hope I can??? :D
And the thread title is in recognition to Jethro Bodine of The Beverly Hillbillies and him learning about math, specifically division. As in 4 gazinta 12 three times, 5 gazinta 30 six times...
Thanks for any assistance.