← All docs

gmp_gcd()

Greatest common divisor.

gmp_gcd()

function gmp_gcd(object|string|int $num1, object|string|int $num2): object

Greatest common divisor.

Parameters:

  • $num1 (object|string|int)
  • $num2 (object|string|int)

Returns: object

Availability

Compiled (AOT)Magician (eval)
AvailableAvailable

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how gmp_gcd is implemented in the compiler, see the internals page.