⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instructions2.doc22.html

📁 一本关于java方面的书籍 英文html形式 关于Java虚拟机
💻 HTML
字号:
<html><head><title>VM Spec  </title></head><body BGCOLOR=#eeeeff text=#000000 LINK=#0000ff VLINK=#000077 ALINK=#ff0000> <a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc21.html">Prev</a> | <a href="Instructions2.doc23.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><hr><br> <a name="d2i"></a><h2>d2i</h2><a name="d2i.Operation"></a><b>Operation</b><br><a name="67449"></a>Convert <code>double</code> to <code>int</code><p><Table Border="3"><tr><td><a name="67448"></a> <i>d2i</i><td><a name="87568"></a> </Table><Table><tr><td></Table><p><a name="d2i.Forms"></a><b>Forms</b><br><a name="67450"></a><i>d2i</i> = 142 (0x83)<p><a name="d2i.Stack"></a><b>Stack</b><br><a name="67451"></a>..., <i>value.word1</i>, <i>value.word2</i> <img src="chars/arrwdbrt.gif"> ..., <i>result</i><p><a name="d2i.Description"></a><b>Description</b><br><a name="67452"></a>The <i>value</i> on the top of the operand stack must be of type <code>double</code>. It is popped from the operand stack and converted to an <code>int</code>. The <i>result</i> is pushed onto the operand stack: <p><ul><a name="67453"></a><li>If the <i>value</i> is NaN, the <i>result</i> of the conversion is an <code>int</code> 0. <a name="67454"></a><li>Otherwise, if the <i>value</i> is not an infinity, it is rounded to an integer value <i>V</i>, rounding towards zero using IEEE 754 round-towards-zero mode. If this integer value <i>V</i> can be represented as an <code>int</code>, then the <i>result</i> is the <code>int</code> value <em>V</em>.<a name="67455"></a><li>Otherwise, either the <i>value</i> must be too small (a negative value of large magnitude or negative infinity), and the <i>result</i> is the smallest representable value of type <code>int</code>, or the <i>value</i> must be too large (a positive value of large magnitude or positive infinity), and the <i>result</i> is the largest representable value of type <code>int</code>.<a name="d2i.Notes"></a><b>Notes</b><br></ul><a name="67456"></a>The <i>d2i</i> instruction performs a narrowing primitive conversion <a href="Concepts.doc.html#26142">(&#167;2.6.3)</a>. It may lose information about the overall magnitude of <i>value</i>, and may also lose precision.<p><hr><!-- This inserts footnotes--><p><a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc21.html">Prev</a> | <a href="Instructions2.doc23.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><p><font size=-1>Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)<br><i><a href="Copyright.doc.html">Copyright &#169 1996 Sun Microsystems, Inc.</a>All rights reserved</i><br>Please send any comments or corrections to <a href="mailto:doug.kramer@sun.com">doug.kramer@sun.com</a></font></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -