Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : BCMath Arbitrary Precision Mathematics Functions : bcsub

bcsub

Subtract one arbitrary precision number from another (PHP 4, PHP 5)
string bcsub ( string left_operand, string right_operand [, int scale] )

Example 344. bcsub() example

<?php

$a
= '1.234';
$b = '5';

echo
bcsub($a, $b);     // -3
echo bcsub($a, $b, 4);  // -3.7660

?>

Change Language


Follow Navioo On Twitter
bcadd
bccomp
bcdiv
bcmod
bcmul
bcpow
bcpowmod
bcscale
bcsqrt
bcsub
eXTReMe Tracker