Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: bcsub - Manual
[go: Go Back, main page]

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

search for in the

GMP" width="11" height="7"/> <BC Math 関数
Last updated: Fri, 10 Oct 2008

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() を使用します。

返り値

減算の結果を文字列で返します。

例1 bcsub() の例

<?php

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

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

?>

参考



add a note add a note User Contributed Notes
bcsub
There are no user contributed notes for this page.

GMP" width="11" height="7"/> <BC Math 関数
Last updated: Fri, 10 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites