note 15528 added to function.bcadd
| From: | deepak_pradhan at yahoo dot com | Date: | Sat, 15 Sep 2001 21:40:48 +0000 |
| Subject: | note 15528 added to function.bcadd | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18048@lists.php.net to get a copy of this message | ||
Deciding when to use a convention add or bcadd:
$a = 2.22; $b=3.8888;
$res1 = bcadd($a,$b,3); //res1=6.108
$res2 = bcadd($a,$b); //res2=5
$res3 = round(bcadd($a,$b,3),2); //res3=6.11
$res4 = $a + $b; //res4=6.1088
thx
dp
http://www.php.net/manual/en/function.bcadd.php