<!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">
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>
</body>
</html>