GMP(3) 1 GMP(3)The GMP classINTRODUCTION
A GMP number. These objects support overloaded arithmetic, bitwise and comparison operators.
Note
No object oriented interface is provided to manipulate GMP objects. Please use the procedural GMP API.
GMP
GMPSerializable
PHP Documentation Group GMP(3)
Check Out this Related Man Page
GMP_HAMDIST(3) 1 GMP_HAMDIST(3)gmp_hamdist - Hamming distanceSYNOPSIS
int gmp_hamdist (GMP $a, GMP $b)
DESCRIPTION
Returns the hamming distance between $a and $b. Both operands should be non-negative.
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. It should be positive.
o $b
-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. It should be positive.
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_hamdist(3) example
<?php
$ham1 = gmp_init("1001010011", 2);
$ham2 = gmp_init("1011111100", 2);
echo gmp_hamdist($ham1, $ham2) . "
";
/* hamdist is equivalent to: */
echo gmp_popcount(gmp_xor($ham1, $ham2)) . "
";
?>
The above example will output:
6
6
SEE ALSO gmp_popcount(3), gmp_xor(3).
PHP Documentation Group GMP_HAMDIST(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 Friends
I have a compiler(Sun Forte,I believe) running in my Solaris 9 box.
since y'day my development team is finding this error when they compile:
ld.so.1: expr: fatal: libgmp.so.3: open failed: No such file or directory
I ran a search for this file and found it in one of my file... (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)
I want to install a recent version of gmp on Fedora. Tried to use yum
# yum list | grep gmp
gmp.i686 4.3.1-6.fc13 @fedora
gmp.x86_64 4.3.1-6.fc13 @fedora
gmp-devel.x86_64 ... (3 Replies)