ieee 0.5 → 0.6
raw patch · 2 files changed
+5/−3 lines, 2 files
Files
- Data/AEq.hs +3/−1
- ieee.cabal +2/−2
Data/AEq.hs view
@@ -24,6 +24,7 @@ -- | A reliable way to test if two values are exactly equal. For floating -- point values, this will consider @NaN@ to be (===) to @NaN@. (===) :: a -> a -> Bool+ (===) = (==) -- | An approximate equality comparison operator. For @RealFloat@ values, -- @(~==) x y = (x == y)@@ -33,7 +34,8 @@ -- For Complex numbers, the if the real and imaginary parts are not -- approximately equal, the polar forms are compared, instead. (~==) :: a -> a -> Bool- + (~==) = (==) + identicalRealFloat :: (RealFloat a) => a -> a -> Bool identicalRealFloat x y = (x == y) || (isNaN x && isNaN y)
ieee.cabal view
@@ -1,6 +1,6 @@ name: ieee-version: 0.5-homepage: http://github.com/patperry/ieee+version: 0.6+homepage: http://github.com/patperry/hs-ieee synopsis: Approximate comparisons for IEEE floating point numbers description: Approximate comparison of floating point numbers based on the