[Haskell-cafe] attoparsec double precision, quickCheck and aeson

Warren Harris warrensomebody at gmail.com
Tue Jun 5 20:38:56 CEST 2012

On Jun 5, 2012, at 10:51 AM, Bryan O'Sullivan wrote:

> On Tue, Jun 5, 2012 at 9:12 AM, Warren Harris <warrensomebody at gmail.com> wrote:
> which helps in many cases, but for some the parsing seems bi-stable, alternating between two imprecise double values and causing the test to fail. I was wondering if anyone could suggest a better work-around for this problem, or explain why Attoparsec's double parser can't be isomorphic to haskell's.
> If you need the full precision, use rational instead. The double parser is there because parsing floating point numbers is often a bottleneck, and double intentionally trades speed for precision. 

I'm actually using Aeson and the parser it provides, so I don't really have the option of using rational.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120605/f55b7406/attachment.htm>

More information about the Haskell-Cafe mailing list