📄 instructions2.doc65.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.doc64.html">Prev</a> | <a href="Instructions2.doc66.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><hr><br> <a name="frem"></a><h2>frem</h2><a name="frem.Operation"></a><b>Operation</b><br><a name="68126"></a>Remainder <code>float</code><p><Table Border="3"><tr><td><a name="68125"></a> <i>frem</i><td><a name="87568"></a> </Table><Table><tr><td></Table><p><a name="frem.Forms"></a><b>Forms</b><br><a name="68127"></a><i>frem</i> = 114 (0x72)<p><a name="frem.Stack"></a><b>Stack</b><br><a name="68128"></a>..., <i>value1</i><em>, </em><i>value2</i> <img src="chars/arrwdbrt.gif"> ..., <i>result</i><p><a name="frem.Description"></a><b>Description</b><br><a name="68129"></a>Both <i>value1</i> and <i>value2</i> must be of type <code>float</code>. The values are popped from the operand stack. The <i>result</i> is calculated and pushed onto the operand stack as a <code>float</code>.<p><a name="68130"></a>The <i>result</i> of an <i>frem</i> instruction is not the same that of the as the so-called remainder operation defined by IEEE 754. The IEEE 754 "remainder" operation computes the remainder from a rounding division, not a truncating division, and so its behavior is <i>not</i> analogous to that of the usual integer remainder operator. Instead, the Java Virtual Machine defines <i>frem</i> to behave in a manner analogous to that of the Java Virtual Machine integer remainder instructions (<i>irem</i> and <i>lrem</i>); this may be compared with the C library function <code>fmod</code>.<p><a name="68134"></a>The result of an <i>frem</i> instruction is governed by these rules:<p><ul><a name="68135"></a><li>If either value is NaN, the result is NaN.<a name="68136"></a><li>If neither value is NaN, the sign of the result equals the sign of the dividend.<a name="68137"></a><li>If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN.</ul><hr><!-- This inserts footnotes--><p><a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc64.html">Prev</a> | <a href="Instructions2.doc66.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 © 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 + -