[Gambas-user] Calculation Bug?
James Linden
kodekrash at ...1...
Tue Nov 28 00:22:53 CET 2006
Gambas does not appear to know how to handle 8 digit numbers...
Dim fTmp1 As Float
fTmp1 = 60 * 1000000
Message.Info( CStr( fTmp1 ) )
-- James
PS: Isn't your formula a bit redundant -- you multiply by (618*2), then
divide by (618*2)... ?
R. Stormo wrote:
> I'm doing a small calculation for a CDI box to a 4 wheel bike. And when I
> putting the function togheter it does not calculate the right values
> according to the calculator.
>
>>From Debug.
> Dim fTmp1 as Float
> fTmp1 = 618 * 2 * 60 * 1000000 / (618 * 2) / 360 =2574.51449119022
>
>
> The calculator gives the value
>
> 166666,666666667
>
> Spreadsheet gives
> 166666,666666667
>
> So there must be something wrong in gambas when calculation is done.
>
> Because if I take one zero from the 1000000 it gives me a total different
> value
> Dim fTmp1 as Float
> fTmp1 = 618 * 2 * 60 * 100000 / (618 * 2) / 360 =-2638.29241280115
>
> Should have been 16666,6666666667
>
>
>
> Regards R. Stormo
>
> My Gambas Community http://gambasforum.tk
>
>
More information about the User
mailing list