</pre></div></div></div><scripttype="text/javascript">AddLanguageTabSet("ID0EDCA");</script><h4class="subHeading">Parameters</h4><dl><dt><spanclass="parameter">rop</span></dt><dd>Type:<ahref="8beda7fb-bbc4-b56f-fd1f-1459377ecb3b.htm">Math.Gmp.Native<spanid="LSTB556957E_1"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTB556957E_1?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpz_t</a><br/>The destination integer.</dd><dt><spanclass="parameter">op</span></dt><dd>Type:<ahref="37c88d6c-8d02-2330-ad77-f20fb73d1677.htm">Math.Gmp.Native<spanid="LSTB556957E_2"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTB556957E_2?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpf_t</a><br/>The source integer.</dd></dl></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><spanclass="selflink">mpz_set_f</span> truncate <spanclass="parameter">op</span> to make it an integer.
<spanclass="highlight-comment">// Release unmanaged memory allocated for x and y.</span>
gmp_lib.mpz_clear(x);
gmp_lib.mpf_clear(y);</pre></div><divid="ID0EDAABA_code_Div2"class="codeSnippetContainerCode"style="display: none"><prexml:space="preserve"><spanclass="highlight-comment">' Create and initialize new integer x, and float y.</span>
<spanclass="highlight-keyword">Dim</span> x <spanclass="highlight-keyword">As</span><spanclass="highlight-keyword">New</span> mpz_t()
gmp_lib.mpz_init(x)
<spanclass="highlight-keyword">Dim</span> y <spanclass="highlight-keyword">As</span> mpf_t = <spanclass="highlight-literal">"1.7007e3"</span>
<spanclass="highlight-comment">' Set the value of x to the truncation of 1700.7.</span>
gmp_lib.mpz_set_f(x, y)
<spanclass="highlight-comment">' Assert that the value of x is 1700.</span>
gmp_lib.mpf_clear(y)</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="3a4e6141-0771-f9ac-2283-5e9348f86d4a.htm">mpz_set</a></div><divclass="seeAlsoStyle"><ahref="7daadb71-9f36-2848-86c4-ba1fba25fcfd.htm">mpz_set_ui</a></div><divclass="seeAlsoStyle"><ahref="1ffac718-d814-0556-ea54-dbf1d676e0cc.htm">mpz_set_si</a></div><divclass="seeAlsoStyle"><ahref="8d6c39e2-22d8-d0ef-219c-dc594e73b2c5.htm">mpz_set_d</a></div><divclass="seeAlsoStyle"><ahref="f6eeca07-edf7-6915-36e4-e8a7a62333d7.htm">mpz_set_q</a></div><divclass="seeAlsoStyle"><ahref="6a3819df-abc1-ceb1-a5c7-87a879977b8c.htm">mpz_set_str</a></div><divclass="seeAlsoStyle"><ahref="90eada10-67d0-8376-0010-d053e5043b96.htm">mpz_swap</a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="/Math.Gmp.Native/html/3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm#Assigning_Integers">Assigning Integers</a></a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="https://gmplib.org/manual/Assigning-Integers.html#Assigning-Integers">GNU MP - Assigning Integers</a></a></div></div></div></div><divid="pageFooter"class="pageFooter"></div></body></html>