<div dir="ltr">That's what I suggested might be the case and this makes sense. Thank you :)</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 22, 2015 at 12:17 PM, Mike Izbicki <span dir="ltr"><<a href="mailto:mike@izbicki.me" target="_blank">mike@izbicki.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> My thoughts exactly, I think this would be *really* cool as an HLint-style tool.<br>
<br>
</span>The main problem with this is that numerically stable expressions are<br>
often very opaque.  If you look at the first example in the README, I<br>
would definitely rather have:<br>
<br>
w far near = -(2 * far * near) / (far - near)<br>
<br>
in my code than<br>
<br>
w near far = if near < -1.7210442634149447e+81<br>
    then (2.0 * near / (near - far)) * far<br>
    else if near < 8.364504563556443e+16<br>
        then (2.0 * near) / ((near - far) / far)<br>
        else ((2.0 * near) / (near - far)) * far<br>
<br>
One of the reasons I use Haskell is because the code is "at the level<br>
of thought" and GHC translates this into awesome speed without the<br>
programmer needing to worry about the gory details in most cases.  I<br>
want that same experience for numerical stability.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Chris Allen<br><div><span style="font-size:12.8000001907349px">Currently working on </span><a href="http://haskellbook.com" target="_blank">http://haskellbook.com</a></div></div></div></div></div></div>
</div>