Control.Lens.Setter (**~) doctest fails on some platforms #310

cjwatson opened this Issue Jun 14, 2013 · 5 comments


None yet

3 participants


On a couple of Debian architectures, one of the doctests for **~ fails due to a slight floating-point inequality, as follows:

Failure in src/Control/Lens/Setter.hs:672: expression `_2 **~ pi $ (1,3)'

expected: (1,31.54428070019754)
but got: (1,31.544280700197532)

Would it be possible to either compare this to (1,3pi) directly, or else to tolerate some slight difference in the exact floating-point representation of 3pi? It doesn't look as though the precise representation is important to this test.

@ion1 ion1 closed this in ab2c8ee Jun 17, 2013

I suppose that ought to work on all platforms.


It actually only works on platforms whose fundamental number system is binary; there is at least one known system that uses balanced ternary instead. ;-)


:-) Feel free to reopen the bug when trying to build lens on one.


Looks likely, indeed. Uploading to Debian shortly to make sure.



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment