<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 2:58 AM, Shachaf Ben-Kiki <span dir="ltr"><<a href="mailto:shachaf@gmail.com" target="_blank">shachaf@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
<br>
</div>Maybe it would be simpler to say:<br>
<br>
signum x | x == 0 = x<br>
| isNaN x = x<br>
| x > 0 = 1<br>
| otherwise = negate 1<br>
<span class="HOEnZb"><font color="#888888"><br>
Shachaf<br>
</font></span></blockquote></div><br></div><div class="gmail_extra" style>Thanks Shachaf. This version is equivalent to the one I proposed, and it saves one test; so it's definitely preferable. I'll put this one in the ticket that'll finally be created for GHC.</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style>-Levent.</div></div>