Sorry,

I've found the following bug in mod_perl 1.25 and Perl 5.6.1.
Maybe was it already released  but in case not here it is :

perl -e '
$a=0.57;
print sprintf("%03d", $a * 100)'

prints "056" instead of "057"

Same behaviour with $a=0,58 that prints "057".

Of course it works for other values and also if you write 

$a=0,57*100;
print sprintf("%03d", $a);


Bug in sprintf() ?


Sincerely,

db

Reply via email to