Return the remainder | r | where r = <spanclass="parameter">n</span> - q * <spanclass="parameter">d</span>, and where q = ceiling(<spanclass="parameter">n</span> / <spanclass="parameter">d</span>).
</pre></div></div></div><scripttype="text/javascript">AddLanguageTabSet("ID0EDCA");</script><h4class="subHeading">Parameters</h4><dl><dt><spanclass="parameter">n</span></dt><dd>Type:<ahref="8beda7fb-bbc4-b56f-fd1f-1459377ecb3b.htm">Math.Gmp.Native<spanid="LSTEA38AE22_1"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTEA38AE22_1?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpz_t</a><br/>The numerator integer.</dd><dt><spanclass="parameter">d</span></dt><dd>Type:<ahref="http://msdn2.microsoft.com/en-us/library/ctys3981"target="_blank">System<spanid="LSTEA38AE22_2"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTEA38AE22_2?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>UInt32</a><br/>The denominator integer.</dd></dl><h4class="subHeading">Return Value</h4>Type:<ahref="http://msdn2.microsoft.com/en-us/library/06cf7918"target="_blank">UInt64</a><br/>The remainder | r | where r = <spanclass="parameter">n</span> - q * <spanclass="parameter">d</span>, and where q = ceiling(<spanclass="parameter">n</span> / <spanclass="parameter">d</span>).</div><divclass="collapsibleAreaRegion"><spanclass="collapsibleRegionTitle"onclick="SectionExpandCollapse('ID2RB')"onkeypress="SectionExpandCollapse_CheckKey('ID2RB', event)"tabindex="0"><imgid="ID2RBToggle"class="collapseToggle"src="../icons/SectionExpanded.png"/>Examples</span></div><divid="ID2RBSection"class="collapsibleSection"><divclass="codeSnippetContainer"><divclass="codeSnippetContainerTabs"><divid="ID0EDAABA_tab1"class="codeSnippetContainerTab"><ahref="#"onclick="javascript:ChangeTab('ID0EDAABA','cs','1','4');return false;">C#</a></div><divid="ID0EDAABA_tab2"class="codeSnippetContainerTab"><ahref="#"onclick="javascript:ChangeTab('ID0EDAABA','vb','2','4');return false;">VB</a></div><divid="ID0EDAABA_tab3"class="codeSnippetContainerTabPhantom"><ahref="#"onclick="javascript:ChangeTab('ID0EDAABA','cpp','3','4');return false;">C++</a></div><divid="ID0EDAABA_tab4"class="codeSnippetContainerTabPhantom"><ahref="#"onclick="javascript:ChangeTab('ID0EDAABA','fs','4','4');return false;">F#</a></div></div><divclass="codeSnippetContainerCodeContainer"><divclass="codeSnippetToolBar"><divclass="codeSnippetToolBarText"><aid="ID0EDAABA_copyCode"href="#"class="copyCodeSnippet"onclick="javascript:CopyToClipboard('ID0EDAABA');return false;"title="Copy">Copy</a></div></div><divid="ID0EDAABA_code_Div1"class="codeSnippetContainerCode"style="display: block"><prexml:space="preserve"><spanclass="highlight-comment">// Create, initialize, and set the value of n to 10000.</span>
<spanclass="highlight-comment">// Release unmanaged memory allocated for n.</span>
gmp_lib.mpz_clear(n);</pre></div><divid="ID0EDAABA_code_Div2"class="codeSnippetContainerCode"style="display: none"><prexml:space="preserve"><spanclass="highlight-comment">' Create, initialize, and set the value of n to 10000.</span>
<spanclass="highlight-keyword">Dim</span> n <spanclass="highlight-keyword">As</span><spanclass="highlight-keyword">New</span> mpz_t()
gmp_lib.mpz_clear(n)</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('ID3RB')"onkeypress="SectionExpandCollapse_CheckKey('ID3RB', event)"tabindex="0"><imgid="ID3RBToggle"class="collapseToggle"src="../icons/SectionExpanded.png"/>See Also</span></div><divid="ID3RBSection"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="8b1e9c27-7278-6032-80c0-015b93258d96.htm">mpz_cdiv_q</a></div><divclass="seeAlsoStyle"><ahref="e8f34851-d0b2-335e-1ea5-f9129062aabf.htm">mpz_cdiv_r</a></div><divclass="seeAlsoStyle"><ahref="7f89c102-d1eb-2dab-0e6e-061893309c4b.htm">mpz_cdiv_qr</a></div><divclass="seeAlsoStyle"><ahref="05b3707d-5f48-4d76-c42a-566f3179d7f8.htm">mpz_cdiv_q_ui</a></div><divclass="seeAlsoStyle"><ahref="af797947-8f84-320e-d1cd-ba578b26cef3.htm">mpz_cdiv_r_ui</a></div><divclass="seeAlsoStyle"><ahref="7aee9fae-9d14-72be-6d0f-0f9c4a863fe5.htm">mpz_cdiv_qr_ui</a></div><divclass="seeAlsoStyle"><ahref="a4def6d8-f8a5-f76f-4ef0-3e6e7eec23fb.htm">mpz_cdiv_q_2exp</a></div><divclass="seeAlsoStyle"><ahref="8320e5d8-1df9-ca26-3054-e4b93cc0f616.htm">mpz_cdiv_r_2exp</a></div><divclass="seeAlsoStyle"><ahref="2ff1eb0a-f399-2ad2-f7d1-3fb51dceac10.htm">mpz_congruent_p</a></div><divclass="seeAlsoStyle"><ahref="2ddc32dc-4ee3-18e9-dd3d-7e64c3304e1e.htm">mpz_divexact</a></div><divclass="seeAlsoStyle"><ahref="4bafc7fe-d2a8-7cf2-b9b8-c296550b4ef2.htm">mpz_divisible_p</a></div><divclass="seeAlsoStyle"><ahref="d9ab5220-69aa-8e5d-8d15-375eb27149ad.htm">mpz_fdiv_qr</a></div><divclass="seeAlsoStyle"><ahref="8d141ae9-4a01-bdc9-caf3-8daba3321ac1.htm">mpz_mod</a></div><divclass="seeAlsoStyle"><ahref="387ec1dd-15b3-4cc9-862a-e3f0a8e2cb78.htm">mpz_tdiv_qr</a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="/html/3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm#Integer_Division">Integer Division</a></a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="https://gmplib.org/manual/Integer-Division.html#Integer-Division">GNU MP - Integer Division</a></a></div></div></div></div><divid="pageFooter"class="pageFooter"></div></body></html>