Home > PHP > Function > GMP > gmp_hamdist()

gmp_hamdist()

gmp_hamdist - Hamming distance

Syntax

int gmp_hamdist (resource $a, resource $b)

Arguments

  • a - It can be either a GMP number resource, or a numeric string given that it is possible to convert the latter to a number. It should be positive.
  • b - It can be either a GMP number resource, or a numeric string given that it is possible to convert the latter to a number. It should be positive.

Description

Returns the hamming distance between a and b. Both operands should be non-negative.

Version

PHP 4.0.4, 5

Return value

A GMP number resource.