gmp_gcd(3) php man page | unix.com

Man Page: gmp_gcd

Operating Environment: php

Section: 3

GMP_GCD(3)								 1								GMP_GCD(3)

gmp_gcd - Calculate GCD

SYNOPSIS
GMP gmp_gcd (GMP $a, GMP $b)
DESCRIPTION
Calculate greatest common divisor of $a and $b. The result is always positive even if either of, or both, input operands are 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. 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.
RETURN VALUES
A positive GMP number that divides into both $a and $b.
EXAMPLES
Example #1 gmp_gcd(3) example <?php $gcd = gmp_gcd("12", "21"); echo gmp_strval($gcd) . " "; ?> The above example will output: 3 PHP Documentation Group GMP_GCD(3)
Related Man Pages
gmp_clrbit(3) - php
gmp_div_q(3) - php
gmp_hamdist(3) - php
php_strip_whitespace(3) - php
pow(3) - php
Similar Topics in the Unix Linux Community
User Guide: Posting in the Emergency Forum
New Code Tags (Syntax Highlighting)
Please Welcome Don Cragun as Lead Moderator
Please Welcome Ravinder Singh to the Moderation Team
Please Welcome Nicki Paul to the Moderator Team!