Bug #3404 Updated: Calculate error
| From: | Bug Database | Date: | Wed, 01 Mar 2000 19:52:07 +0000 |
| Subject: | Bug #3404 Updated: Calculate error | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16227@lists.php.net to get a copy of this message | ||
ID: 3404
Updated by: hholzgra
Reported By: gena@svt.unity.net
Status: Closed
Bug Type: Other
Assigned To:
Comments:
this is the old binary/decimal conversion
problem for fractions
<br>
either use printf/sprintf with a format-string
that does not show all decimals, for example
<br>
<?php
printf("%.2f",120 + 2.01 - 121.94);
?>
<br>
will give you only to decimals
<br>
or use the bcmath functions if you really need
the precise values
Full Bug description available at: http://bugs.php.net/?id=3404