<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 10, 2013 at 5:08 AM, Bryan Vicknair <span dir="ltr"><<a href="mailto:bryanvick@gmail.com" target="_blank">bryanvick@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 id=":24v" style="overflow:hidden">And all of a sudden, the parsing code doesn't work again!:<br><br>
Prelude Data.Text Lib> validateVal $ pack "0.12"<br>
Success (Just 11)<br></div></blockquote></div><br>This might be due to a floating-point roundoff error since 0.12 doesn't have a finite binary representation.</div><div class="gmail_extra"><br></div><div class="gmail_extra">
The function truncate does exactly what it says, so truncate (100 * 0.1199999) evaluates to 11.</div><div class="gmail_extra"><br>Are you sure you don't want "round" instead of "truncate"?<br><br clear="all">
<div>-- Kim-Ee</div>
</div></div>