Skip to content

Commit

Permalink
Fix testsuite failure on hurd-i386.
Browse files Browse the repository at this point in the history
expected: 5.0
 but got: 4.999999999999999
  • Loading branch information
ekmett committed Apr 25, 2014
1 parent 330109e commit 1a59eb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Numeric/Lens.hs
Expand Up @@ -161,8 +161,8 @@ dividing n = iso (/n) (*n)
--
-- Note: This errors for n = 0
--
-- >>> au (exponentiating 2._Unwrapping Sum) (foldMapOf each) (3,4)
-- 5.0
-- >>> au (exponentiating 2._Unwrapping Sum) (foldMapOf each) (3,4) == 5
-- True
exponentiating :: (Floating a, Eq a) => a -> Iso' a a
exponentiating 0 = error "Numeric.Lens.exponentiating: exponent 0"
exponentiating n = iso (**n) (**recip n)

0 comments on commit 1a59eb2

Please sign in to comment.