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 from the conversion 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.
For too big an infinity is returned when available.
Hardware overflow, underflow and denorm traps may or may not occur.
</p></div><divclass="collapsibleAreaRegion"><spanclass="collapsibleRegionTitle"onclick="SectionExpandCollapse('ID3RB')"onkeypress="SectionExpandCollapse_CheckKey('ID3RB', event)"tabindex="0"><imgid="ID3RBToggle"class="collapseToggle"src="../icons/SectionExpanded.png"/>Examples</span></div><divid="ID3RBSection"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 x to 10 / 11.</span>
mpq_t x = <spanclass="highlight-keyword">new</span> mpq_t();
<spanclass="highlight-comment">// Release unmanaged memory allocated for x.</span>
gmp_lib.mpq_clear(x);</pre></div><divid="ID0EDAABA_code_Div2"class="codeSnippetContainerCode"style="display: none"><prexml:space="preserve"><spanclass="highlight-comment">' Create, initialize, and set the value of x to 10 / 11.</span>
<spanclass="highlight-keyword">Dim</span> x <spanclass="highlight-keyword">As</span><spanclass="highlight-keyword">New</span> mpq_t()
<spanclass="highlight-comment">' Release unmanaged memory allocated for x.</span>
gmp_lib.mpq_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="1a7c5874-9132-2c43-e407-df1eead74fab.htm">gmp_lib<spanid="LSTA30F8AC8_2"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTA30F8AC8_2?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpq_set_d(mpq_t, Double)</a></div><divclass="seeAlsoStyle"><ahref="f5dc74ec-155b-2a14-3eb5-4610a8509bae.htm">gmp_lib<spanid="LSTA30F8AC8_3"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTA30F8AC8_3?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpq_set_f(mpq_t, mpf_t)</a></div><divclass="seeAlsoStyle"><ahref="f457878b-c3f5-bfe2-aaa9-7f2179332f57.htm">gmp_lib<spanid="LSTA30F8AC8_4"></span><scripttype="text/javascript">AddLanguageSpecificTextSet("LSTA30F8AC8_4?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>mpq_get_str(char_ptr, Int32, mpq_t)</a></div><divclass="seeAlsoStyle"><ahref="3af6b34c-3242-2b75-e7c7-ab79af8a4b0f.htm"><ahref="https://gmplib.org/manual/Rational-Conversions.html#Rational-Conversions">GNU MP - Rational Conversions</a></a></div></div></div></div><divid="pageFooter"class="pageFooter"></div></body></html>