my $result = 4.25 / 1200; Yields 0
It shouldn't, and it doesn't for me.
>perl -le"$result = 4.25 / 1200; print $result" 0.00354166666666667
I tried $result = sprintf "0.7f", 4.25 / 1200; That didn't work.
$result = sprintf "%0.7f", 4.25 / 1200; ^ | missing
In reply to Re: Dividing and result of zero.
by ikegami
in thread Dividing and result of zero.
by dbmathis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |