<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Jeff Cohen wrote:
<blockquote cite="mid460311DF.5000901@jolt-lang.org" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Reid Spencer wrote:
  <blockquote cite="mid1174605761.13912.605.camel@bashful.x10sys.com"
 type="cite">
    <pre wrap="">On Thu, 2007-03-22 at 15:50 -0700, leo han wrote:
  </pre>
    <blockquote type="cite">
      <pre wrap="">Hello, I have a question about the constant folding for fdiv instructions. 
For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I 
think this should be nan. Can anyone tell me why it is not nan?
    </pre>
    </blockquote>
    <pre wrap=""><!---->
I think the specification says that it is "undefined" so any value will
do. inf is just as undefined as nan.

Reid.</pre>
  </blockquote>
  <br>
In IEEE Std 754-1985, subclause 7.2- Division by Zero, it says:<br>
  <br>
  <i>"If the divisor is zero and the dividend is a finite nonzero
number,
then the division by zero shall be signaled. The result, when no trap
occurs, shall be a correctly signed (infinity symbol)(6.3)."<br>
  <br>
  </i>So LLVM is correct (assuming it handles signs correctly).<br>
</blockquote>
<br>
Never mind... only applies if a non-zero number is being divided by
zero.<br>
<blockquote cite="mid460311DF.5000901@jolt-lang.org" type="cite">
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
  </pre>
</blockquote>
</body>
</html>