#sponnu {padding:3px;background-color:#900;height:14px;text-align:center;color:#FFF;font-family:arial;font-size:11px;border:1px solid #FFF} #sponnu a{color:#FFF;font-weight:bold;font-size:11px;text-decoration:underline;}

 Main Menu PHP Tools PHP Help Request PHP Editors Newsletter Editor Search Reviewed PHP Editors Latest News Submit News PHP Tutorials PHP Book Reviews Online Book Chapters PHP Games

 Forums PHP Desktop Editors Other PHP Tools PHP Contests PHP Programming Help Linux Help Apache Help MySQL Help PHP Games PHP Jobs PHP Forums Home

 Programming Contest

 Documentation

 Partner Sites

gmp_gcdext

# gmp_gcdext

(PHP 4 >= 4.0.4, PHP 5)

gmp_gcdext -- Calculate GCD and multipliers

## Description

array gmp_gcdext ( resource a, resource b )

Calculates g, s, and t, such that a*s + b*t = g = gcd(a,b), where gcd is the greatest common divisor. Returns an array with respective elements g, s and t.

This function can be used to solve linear Diophantine equations in two variables. These are equations that allow only integer solutions and have the form: a*x + b*y = c. For more information, go to the "Diophantine Equation" page at MathWorld

Example 1. Solving a linear Diophantine equation

 ``` ```

 © Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.