<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">&lt;<a href="mailto:bryanvick@gmail.com" target="_blank">bryanvick@gmail.com</a>&gt;</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&#39;t work again!:<br><br>
  Prelude Data.Text Lib&gt; validateVal $ pack &quot;0.12&quot;<br>
  Success (Just 11)<br></div></blockquote></div><br>This might be due to a floating-point roundoff error since 0.12 doesn&#39;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&#39;t want &quot;round&quot; instead of &quot;truncate&quot;?<br><br clear="all">

<div>-- Kim-Ee</div>
</div></div>