Set {<spanclass="parameter">rp</span>, retval} to the greatest common divisor of {<spanclass="parameter">xp</span>, <spanclass="parameter">xn</span>} and {<spanclass="parameter">yp</span>, <spanclass="parameter">yn</span>}.
</pre></div></div></div><scripttype="text/javascript">AddLanguageTabSet("ID0EDCA");</script><h4class="subHeading">Parameters</h4><dl><dt><spanclass="parameter">rp</span></dt><dd>Type:<ahref="4609ac5e-5cf9-cd20-2fa9-8040101c165c.htm">Math.Gmp.Native<spanid="LST148E1D75_1"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LST148E1D75_1?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mp_ptr</a><br/>The result integer.</dd><dt><spanclass="parameter">xp</span></dt><dd>Type:<ahref="4609ac5e-5cf9-cd20-2fa9-8040101c165c.htm">Math.Gmp.Native<spanid="LST148E1D75_2"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LST148E1D75_2?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mp_ptr</a><br/>The first operand integer.</dd><dt><spanclass="parameter">xn</span></dt><dd>Type:<ahref="4b58a584-7a0e-b600-18fa-ebd493861eb3.htm">Math.Gmp.Native<spanid="LST148E1D75_3"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LST148E1D75_3?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mp_size_t</a><br/>The number of limbs of <spanclass="parameter">xp</span>.</dd><dt><spanclass="parameter">yp</span></dt><dd>Type:<ahref="4609ac5e-5cf9-cd20-2fa9-8040101c165c.htm">Math.Gmp.Native<spanid="LST148E1D75_4"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LST148E1D75_4?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mp_ptr</a><br/>The second operand integer.</dd><dt><spanclass="parameter">yn</span></dt><dd>Type:<ahref="4b58a584-7a0e-b600-18fa-ebd493861eb3.htm">Math.Gmp.Native<spanid="LST148E1D75_5"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LST148E1D75_5?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mp_size_t</a><br/>The number of limbs of <spanclass="parameter">yp</span>.</dd></dl><h4class="subHeading">Return Value</h4>Type:<ahref="4b58a584-7a0e-b600-18fa-ebd493861eb3.htm">mp_size_t</a><br/>The result can be up to <spanclass="parameter">yn</span> limbs, the return value is the actual number produced; i.e. the number of limbs of <spanclass="parameter">rp</span>.</div><divclass="collapsibleAreaRegion"><spanclass="collapsibleRegionTitle"onclick="SectionExpandCollapse('ID2RB')"onkeypress="SectionExpandCollapse_CheckKey('ID2RB', event)"tabindex="0"><imgid="ID2RBToggle"class="collapseToggle"src="../icons/SectionExpanded.png"/>Remarks</span></div><divid="ID2RBSection"class="collapsibleSection"><p>
of {<spanclass="parameter">yp</span>, <spanclass="parameter">yn</span>} must be non-zero.
No overlap is permitted between {<spanclass="parameter">xp</span>, <spanclass="parameter">xn</span>} and {<spanclass="parameter">yp</span>, <spanclass="parameter">yn</span>}.
gmp_lib.free(rp, xp, yp, result)</pre></div><divid="ID0EDAABA_code_Div3"class="codeSnippetContainerCode"style="display: none"><p>No code example is currently available or this language may not be supported.</p></div><divid="ID0EDAABA_code_Div4"class="codeSnippetContainerCode"style="display: none"><p>No code example is currently available or this language may not be supported.</p></div></div></div><scripttype="text/javascript">AddLanguageTabSet("ID0EDAABA");</script></div><divclass="collapsibleAreaRegion"id="seeAlsoSection"><spanclass="collapsibleRegionTitle"onclick="SectionExpandCollapse('ID4RB')"onkeypress="SectionExpandCollapse_CheckKey('ID4RB', event)"tabindex="0"><imgid="ID4RBToggle"class="collapseToggle"src="../icons/SectionExpanded.png"/>See Also</span></div><divid="ID4RBSection"class="collapsibleSection"><h4class="subHeading">Reference</h4><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm">gmp_lib Class</a></div><divclass="seeAlsoStyle"><ahref="d9c51b9f-0c54-770b-28ea-6eebd8fef368.htm">Math.Gmp.Native Namespace</a></div><divclass="seeAlsoStyle"><ahref="64373933-f98b-74b4-c10f-3b1a98c410bc.htm">gmp_lib<spanid="LST148E1D75_6"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LST148E1D75_6?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpn_gcd_1(mp_ptr, mp_size_t, mp_limb_t)</a></div><divclass="seeAlsoStyle"><ahref="1d98a5d2-dff5-3fd2-c322-13c56beabb21.htm">mpn_gcdext Overload</a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="https://gmplib.org/manual/Low_002dlevel-Functions.html#Low_002dlevel-Functions">GNU MP - Low-level Functions</a></a></div></div></div></div><divid="pageFooter"class="pageFooter"></div></body></html>