GMP_CLRBIT(3) 1 GMP_CLRBIT(3)gmp_clrbit - Clear bitSYNOPSIS
void gmp_clrbit (GMP $a, int $index)
DESCRIPTION
Clears (sets to 0) bit $index in $a. The index starts at 0.
PARAMETERS
o $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.
o $index
- The index of the bit to clear. Index 0 represents the least significant bit.
RETURN VALUES
A GMP number resource in PHP 5.5 and earlier, or a GMP object in PHP 5.6 and later.
EXAMPLES
Example #1
gmp_clrbit(3) example
<?php
$a = gmp_init("0xff");
gmp_clrbit($a, 0); // index starts at 0, least significant bit
echo gmp_strval($a) . "
";
?>
The above example will output:
254
NOTES
Note
Unlike most of the other GMP functions, gmp_clrbit(3) must be called with a GMP resource that already exists (using gmp_init(3) for
example). One will not be automatically created.
SEE ALSO gmp_setbit(3), gmp_testbit(3).
PHP Documentation Group GMP_CLRBIT(3)
Check Out this Related Man Page
GMP_INIT(3) 1 GMP_INIT(3)gmp_init - Create GMP numberSYNOPSIS
GMP gmp_init (mixed $number, [int $base])
DESCRIPTION
Creates a GMP number from an integer or string.
PARAMETERS
o $number
- An integer or a string. The string representation can be decimal, hexadecimal or octal.
o $base
- The base. The base may vary from 2 to 36. If base is 0 (default value), the actual base is determined from the leading charac-
ters: if the first two characters are 0x or 0X, hexadecimal is assumed, otherwise if the first character is "0", octal is assumed,
otherwise decimal is assumed.
RETURN VALUES
A GMP number resource in PHP 5.5 and earlier, or a GMP object in PHP 5.6 and later.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.2 | |
| | |
| | The $base was extended from 2 to 36, to 2 to 62 |
| | and -2 to -36. |
| | |
+--------+---------------------------------------------------+
NOTES
Note
To use the extended base introduced in PHP 5.3.2, then PHP must be compiled against GMP 4.2.0 or greater.
EXAMPLES
Example #1
Creating GMP number
<?php
$a = gmp_init(123456);
$b = gmp_init("0xFFFFDEBACDFEDF7200");
?>
NOTES
Note
It is not necessary to call this function if you want to use integer or string in place of GMP number in GMP functions, like
gmp_add(3). Function arguments are automatically converted to GMP numbers, if such conversion is possible and needed, using the same
rules as gmp_init(3).
PHP Documentation Group GMP_INIT(3)
Hello all,
I'm having trouble building the GNU Multi Precision (GMP 4.1.3) on the HP Intel Itanium 2 HP-UX 11i
I'm hoping someone out there has had some experience building GMP on this platform. After running the ./configure and doing a make I get an error saying:
`.rodata` is not a section
... (3 Replies)
Hi Folks,
Under the path /home, I need to remove the index.html/php files from all the users. But the thing is I need to move the index file from the username starting with a-d, then e-g. How can I do this via the shell script. (2 Replies)
I am trying to set up the gnu multiple precision arithmetic library for some c++ programming I have to do.
I am using a system with mac osx 10.6.3 and do NOT have root user access.
I'm trying to use gmp 5.0.1.
Since I don't have root user access, I had to install to a different directory
Thus... (3 Replies)