<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <br>
    <br>
    <blockquote type="cite" cite="mid:f0ce4889-f9f1-99fa-f5a4-410d04ce6249@oracle.com">
      <blockquote type="cite" cite="mid:5bf2de36-4e56-cb68-2fe3-972d4cadebb8@oracle.com">
        Which raises some questions (again) of the semantics of constant
        patterns for exotic floating point values, especially (again)
        negative zero. <br>
      </blockquote>
      <p><br>
      </p>
      <p>In a switching context, I think there is a stronger case for
        distinguishing between +0.0 and -0.0. The operational semantics
        I'd recommend are to desugar, say a float switch, to an int
        switch on the Float.<span class="element-name">floatToIntBits
          mapping of the float case labels. </span><span class="element-name">Float.<span class="element-name">floatToIntBits,
            as opposed to </span></span><span class="element-name"><span class="element-name"><span class="element-name">Float.<span class="element-name">floatToRawIntBits, normalized all
                NaN representations to a single value.</span></span></span></span></p>
    </blockquote>
    <br>
    This sounds right to me, but its not just about switch -- this would
    have to be the case for all constant patterns, such as<br>
    <br>
        if (x instanceof FloatHolder(Float.NaN)) { ... }<br>
    <br>
    But I think your argument still applies here as well.<br>
  </body>
</html>