<div dir="ltr"><div dir="ltr">Am Mi., 8. März 2023 um 08:05 Uhr schrieb Adam Sotona <<a href="mailto:adam.sotona@oracle.com">adam.sotona@oracle.com</a>>:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-4425207355970907126">





<div lang="en-CZ" style="overflow-wrap: break-word;">
<div class="m_-4425207355970907126WordSection1">
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:11pt">Oh, and constantInstruction() properly handling -0.0d and -0.0f would be nice.  This is the<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:11pt">one patch I have been carrying around since the very beginning that has not been resolved.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:11pt">-- mva<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Hi Michael,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Do you know some cases of -0.0d and -0.0f wrong handling?</span></p></div></div></div></div></div></div></blockquote><div><br></div><div>I don't quite understand the question.</div><div><br></div><div>Negative zero compares as ==-equal to positive zero under IEEE-754, but</div><div>the two are distinct bit patterns.  Both javac and jshell treat them as distinct,</div><div>as do equals() and compareTo().</div><div><br></div><div>jshell> 0.0f == -0.0f<br>$3 ==> true<br><br>jshell> Float.floatToRawIntBits(0.0f)<br>$4 ==> 0<br><br>jshell> Float.floatToRawIntBits(-0.0f)<br>$5 ==> -2147483648<br></div><div><br></div><div>The current constantInstruction would lead to a different output for the last line,</div><div>by squashing the value to 0.0f.</div><div><br></div><div>-- mva</div><div><br></div><div><br></div></div></div>