downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

GMP> <bcsqrt
[edit] Last updated: Fri, 23 Mar 2012

view this page in

bcsub

(PHP 4, PHP 5)

bcsub Odejmuje jedną liczbę o dużej precyzji od drugiej

Opis

string bcsub ( string $lewy_operand , string $prawy_operand [, int $precyzja ] )

Odejmuje prawy_operand od lewy_operand i zwraca wynik jako ciąg znaków. Opcjonalnego argumentu precyzja używa się do określenia ilości miejsc po przecinku dziesiętnym w wyniku.

Przykłady

Przykład #1 bcsub() przykład

<?php 

$a 
'1.234'
$b '5'

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

?>

Zobacz też:

bcadd().



add a note add a note User Contributed Notes bcsub
info at DONOTSPAM dot ict-eagle dot eu 07-Aug-2009 12:43
Note that it is almost useless to put a integer higher than 6 maybe 7 in the scale parameter.

In some cases this might be needed. But for the simple souls, more than 4 is not required in most of the time.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites