03.01.2011, 15:23
(
Последний раз редактировалось Jeffry; 03.01.2011 в 17:47.
)
Hello guys,
I wanted to calculate some jackpot things, like 9/10, but pawno didn't do this:
Test:
And I get:
=> Well, the last one is nearly correct, but the others fail.
Have I done something wrong, or is this a pawno bug?
I'd be happy about help, or people who could test this themself, if they have the same problem.
Jeffry
I wanted to calculate some jackpot things, like 9/10, but pawno didn't do this:
Test:
pawn Код:
printf("%0.2f", 9/10);
printf("%0.2f", 9/100);
printf("%0.3f", 9/1000);
printf("%0.4f", 9/10000);
printf("%0.9f", 9/100);
printf("%f", 9/1000);
printf("----------");
printf("%0.2f", 5/3);
printf("%0.9f", 9*0.01); //Same as: 9/100, just with multiplicate
pawn Код:
[17:20:51] 0.00
[17:20:51] 0.00
[17:20:51] 0.000
[17:20:51] 0.0000
[17:20:51] 0.000000000
[17:20:51] 0.000000
[17:20:51] ----------
[17:20:51] 0.00
[17:20:51] 0.089999996
Have I done something wrong, or is this a pawno bug?
I'd be happy about help, or people who could test this themself, if they have the same problem.
Jeffry
![Cool](images/smilies/cool.gif)