
9 Sep
2013
9 Sep
'13
6:26 p.m.
On Tue, Sep 10, 2013 at 5:08 AM, Bryan Vicknair
And all of a sudden, the parsing code doesn't work again!:
Prelude Data.Text Lib> validateVal $ pack "0.12" Success (Just 11)
This might be due to a floating-point roundoff error since 0.12 doesn't have a finite binary representation. The function truncate does exactly what it says, so truncate (100 * 0.1199999) evaluates to 11. Are you sure you don't want "round" instead of "truncate"? -- Kim-Ee