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
Last updated: Fri, 24 Jul 2009

view this page in

bcsub

(PHP 4, PHP 5)

bcsub임의 정밀도 수 빼기

설명

string bcsub ( string $left_operand , string $right_operand [, int $scale ] )

left_operand 에서 right_operand 를 뺍니다.

인수

left_operand

왼쪽 연산수, 문자열.

right_operand

오른쪽 연산수, 문자열.

scale

이 선택적인 인수는 소수점 아래 자리수를 설정합니다. bcscale()을 사용하여 모든 함수에 대한 전역 기본값을 설정할 수 있습니다.

반환값

뺄셈의 결과, 문자열.

예제

Example #1 bcsub() 예제

<?php

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

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

?>

참고

  • bcadd() - 두 임의 정밀도 수 더하기



add a note add a note User Contributed Notes
bcsub
info at DONOTSPAM dot ict-eagle dot eu
07-Aug-2009 07: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.

GMP> <bcsqrt
Last updated: Fri, 24 Jul 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites