ieee-utils 0.1 → 0.2
raw patch · 2 files changed
+6/−5 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ieee-utils.cabal +3/−2
- src/Numeric/IEEE/RoundMode.hs +3/−3
ieee-utils.cabal view
@@ -1,5 +1,5 @@ name: ieee-utils -version: 0.1 +version: 0.2 cabal-version: >= 1.3 build-type: Simple license: BSD3 @@ -8,9 +8,10 @@ author: Matt Morrow copyright: (c) Matt Morrow maintainer: Matt Morrow <mjm2002@gmail.com> -stability: unstable +stability: provisional synopsis: ieee-utils description: IEEE 754 (Standard for Binary Floating-Point Arithmetic) Utilities. + Haddock docs are at <http://code.haskell.org/~morrow/code/haskell/ieee-utils/haddock/>. library build-tools:
src/Numeric/IEEE/RoundMode.hs view
@@ -5,7 +5,7 @@ Copyright : (c) Matt Morrow 2008 License : BSD3 Maintainer : Matt Morrow <mjm2002@gmail.com>- Stability : unstable+ Stability : provisional Portability : portable (FFI) -} @@ -30,11 +30,11 @@ foreign import ccall unsafe "fenv.h fegetround" c_fegetround :: IO CInt foreign import ccall unsafe "fenv.h fesetround" c_fesetround :: CInt -> IO CInt --- | Get the fpu's current rounding mode.+-- | Gets the fpu's current rounding mode. getRound :: IO RoundMode getRound = (toEnum . fromIntegral) `fmap` c_fegetround --- | Set the fpu's rounding mode. Returns @True@ if successful.+-- | Sets the fpu's rounding mode. Returns @True@ if successful. setRound :: RoundMode -> IO Bool setRound m = (==0) `fmap` c_fesetround (fromIntegral . fromEnum $ m)