From: kevin0051 on
I made a perl program as follows.

-----------------
$AAA = 4.31;
$AAA *= 100;
printf ("%f\n", $AAA);
printf ("%d\n", $AAA);
----------------

The output of this program is
431.000000
430

I don't know why the second output is 431 instead of 431.
Can anyone help?

Thanks
Kevin
 | 
Pages: 1
Prev: strange behavior
Next: floating point issue?