Do you mean it doesn't display trailing zeroes in the decimals? You can add them using sprintf:
$num = 64; $num = sprintf('%.2f', $num); print($num, "\n"); # Prints 64.00
Note that %f rounds:
$num = 123.456; $num = sprintf('%.2f', $num); print($num, "\n"); # Prints 123.46
In reply to Re: math with decimals
by ikegami
in thread math with decimals
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |