<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Jun 10, 2013, at 9:02 AM, Duncan Sands <<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Hi Stephen,<br><br>On 10/06/13 17:53, Stephen Canon wrote:<br><blockquote type="cite">On Jun 10, 2013, at 8:50 AM, Duncan Sands <<a href="mailto:baldrick@free.fr">baldrick@free.fr</a><br><<a href="mailto:baldrick@free.fr">mailto:baldrick@free.fr</a>>> wrote:<br><br><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">If undef can't be achieved, it might still be possible to fold to a NaN<br>or some other special value.<br></blockquote><br>Folding to NaN sounds workable to me.<br></blockquote><br>So if Y is a well-chosen NaN (or will any NaN do?) then fadd X, Y will always<br>be equal to Y?  Does the same go for fmul, fsub and fdiv?<br></blockquote><br>If Y is any NaN, then the result of any IEEE-754 basic operation (add, sub, mul,<br>div, sqrt, ... ) will be NaN (it will not “be equal to Y", because NaNs compare<br>unequal to everything).<br></blockquote><br>by equal I meant: the same bit pattern.</div></blockquote><br></div><div dir="auto">There’s some subtlety here w.r.t. bit patterns (the result of OP x, y when x and y are both NaNs will be a NaN, but the exact bit pattern isn’t pinned down and in practice depends on the phase of the moon).  However, NaN bit patterns are essentially an implementation detail; I think there’s enough room here that we can reasonably fold undef operations to NaN (and as a programmer, I would certainly be very happy to get NaN for undef; NaN is a big obvious smoking gun).</div><div dir="auto"><br></div><div dir="auto">- Steve</div></body></html>