<html><head><metahttp-equiv="X-UA-Compatible"content="IE=edge"/><linkrel="shortcut icon"href="../icons/favicon.ico"/><linkrel="stylesheet"type="text/css"href="../styles/branding.css"/><linkrel="stylesheet"type="text/css"href="../styles/branding-en-US.css"/><scripttype="text/javascript"src="../scripts/branding.js"></script><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>gmp_lib.mpf_get_d Method </title><metaname="Language"content="en-us"/><metaname="System.Keywords"content="mpf_get_d method"/><metaname="System.Keywords"content="gmp_lib.mpf_get_d method"/><metaname="Microsoft.Help.F1"content="Math.Gmp.Native.gmp_lib.mpf_get_d"/><metaname="Microsoft.Help.Id"content="M:Math.Gmp.Native.gmp_lib.mpf_get_d(Math.Gmp.Native.mpf_t)"/><metaname="Description"content="Convert to a double, truncating if necessary (i.e. rounding towards zero)."/><metaname="Microsoft.Help.ContentType"content="Reference"/><metaname="BrandingAware"content="true"/><metaname="container"content="Math.Gmp.Native"/><metaname="file"content="648fa405-45d3-506a-f6be-72642e8a7f32"/><metaname="guid"content="648fa405-45d3-506a-f6be-72642e8a7f32"/><linktype="text/css"rel="stylesheet"href="../styles/highlight.css"/><scripttype="text/javascript"src="../scripts/highlight.js"></script><linkrel="stylesheet"type="text/css"href="../styles/branding-Website.css"/><scripttype="text/javascript"src="../scripts/jquery-1.11.0.min.js"></script><scripttype="text/javascript"src="../scripts/branding-Website.js"></script><scripttype="text/javascript"src="../scripts/clipboard.min.js"></script></head><bodyonload="OnLoad('cs')"><inputtype="hidden"id="userDataCache"class="userDataStyle"/><divclass="pageHeader"id="PageHeader">GMP Native Interface for .NET<formid="SearchForm"method="get"action="#"onsubmit="javascript:TransferToSearchPage(); return false;"><inputid="SearchTextBox"type="text"maxlength="200"/><buttonid="SearchButton"type="submit"></button></form></div><divclass="pageBody"><divclass="leftNav"id="leftNav"><divid="tocNav"><divclass="toclevel0"data-toclevel="0"><aclass="tocCollapsed"onclick="javascript: Toggle(this);"href="#!"/><adata-tochassubtree="true"href="846f5c8a-6cba-433e-9f18-cde2ff5695cd.htm"title="GMP Native Interface for .NET"tocid="roottoc">GMP Native Interface for .NET</a></div><divclass="toclevel0"data-toclevel="0"><aclass="tocCollapsed"onclick="javascript: Toggle(this);"href="#!"/><adata-tochassubtree="true"href="d9c51b9f-0c54-770b-28ea-6eebd8fef368.htm"title="Math.Gmp.Native"tocid="d9c51b9f-0c54-770b-28ea-6eebd8fef368">Math.Gmp.Native</a></div><divclass="toclevel0"data-toclevel="0"><aclass="tocCollapsed"onclick="javascript: Toggle(this);"href="#!"/><adata-tochassubtree="true"href="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"title="gmp_lib Class"tocid="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f">gmp_lib Class</a></div><divclass="toclevel1"data-toclevel="1"data-childrenloaded="true"><aclass="tocExpanded"onclick="javascript: Toggle(this);"href="#!"/><adata-tochassubtree="true"href="0fa7cbf3-e8f4-6b14-d829-8aa663e77c74.htm"title="gmp_lib Methods"tocid="0fa7cbf3-e8f4-6b14-d829-8aa663e77c74">gmp_lib Methods</a></div><divclass="toclevel2"data-toclevel="2"><adata-tochassubtree="false"href="c9cb6a67-59b8-5c03-f31d-f252441c53f6.htm"title="_mpz_realloc Method "tocid="c9cb6a67-59b8-5c03-f31d-f252441c53f6">_mpz_realloc Method </a></div><divclass="toclevel2"data-toclevel="2"><adata-tochassubtree="false"href="2c68671c-cd5c-e2ec-52a2-65b0ca31c3d1.htm"title="allocate Method "tocid="2c68671c-cd5c-e2ec-52a2-65b0ca31c3d1">allocate Method </a></div><divclass="toclevel2"data-toclevel="2"><aclass="tocCollapsed"onclick="javascript: Toggle(this);"href="#!"/><adata-tochassubtree="true"href="92160da3-b1af-e005-cb05-e3fb4dd524d8.htm"title="free Method "tocid="92160da3-b1af-e005-cb05-e3fb4dd524d8">free Method </a></div><divclass="toclevel2"data-toclevel="2"><adata-tochassubtree="false"href="fe6e46c3-8464-a080-b5fc-718589
Convert <spanclass="parameter">op</span> to a <ahref="http://msdn2.microsoft.com/en-us/library/643eft0t"target="_blank">double</a>, truncating if necessary (i.e. rounding towards zero).
If the exponent in <spanclass="parameter">op</span> is too big or too small to fit a <ahref="http://msdn2.microsoft.com/en-us/library/643eft0t"target="_blank">double</a> then the result is system dependent.
<spanclass="highlight-comment">// Release unmanaged memory allocated for x.</span>
gmp_lib.mpf_clear(x);</pre></div><divid="ID0EDAABA_code_Div2"class="codeSnippetContainerCode"style="display: none"><prexml:space="preserve"><spanclass="highlight-comment">' Set default precision to 64 bits.</span>
gmp_lib.mpf_clear(x)</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="e1edc21e-74a0-b44c-216b-bad204b5a48a.htm">mpf_get_d_2exp</a></div><divclass="seeAlsoStyle"><ahref="d948e832-ee71-628a-6a7b-766138afff62.htm">mpf_get_si</a></div><divclass="seeAlsoStyle"><ahref="aa3fd0ea-a8b6-674b-59ff-b6d4785baed1.htm">mpf_get_ui</a></div><divclass="seeAlsoStyle"><ahref="73766ead-a037-a852-4589-04adc3407e15.htm">O:Math.Gmp.Native.gmp_lib.mpf_get_str</a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="/html/3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm#Converting_Floats">Converting Floats</a></a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="https://gmplib.org/manual/Converting-Floats.html#Converting-Floats">GNU MP - Converting Floats</a></a></div></div></div></div><divid="pageFooter"class="pageFooter"></div></body></html>