首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

gmp_com

(PHP 4 >= 4.0.4, PHP 5, PHP 7)

gmp_com — Calculates one's complement

Description

代码语言:javascript
复制
GMP gmp_com ( GMP $a )

Returns the one's complement of a.

Parameters

a

Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.

Return Values

Returns the one's complement of a, as a GMP number.

Examples

Example #1 gmp_com() example

代码语言:javascript
复制
<?php
$com?=?gmp_com("1234");
echo?gmp_strval($com)?.?"\n";
?>

The above example will output:

代码语言:javascript
复制
-1235

← gmp_cmp

gmp_div_q →

代码语言:txt
复制
 ? 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com