gmp_neg
(PHP 4 >= 4.0.4, PHP 5)
gmp_neg — 符号を反転する
説明
resource gmp_neg ( resource a )-a を返します。
例 745. gmp_neg() の例
<?php
$neg1 = gmp_neg("1");
echo gmp_strval($neg1) . "\n";
$neg2 = gmp_neg("-1");
echo gmp_strval($neg2) . "\n";
?>
上のプログラムの出力は以下のようになります。
-1
1
gmp_neg
There are no user contributed notes for this page.