-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Correctly-rounded arbitrary-precision floating-point arithmetic -- -- This package provides numeric instances for MPFR that use "Implicit -- Configurations" from -- http://www.cs.rutgers.edu/~ccshan/prepose/prepose.pdf to choose -- a Rounding and Precision. For those that do not want to -- use reflection, explicit instances are provided for common precisions -- and for the built-in rounding modes. -- -- This package should work correctly with GHC 7.10.1 or later. -- --
--   >>> import Numeric.Rounded
--   
--   >>> :set -XDataKinds
--   
--   >>> exp pi :: Rounded TowardZero 512
--   23.140692632779269005729086367948547380266106242600211993445046409524342350690452783516971997067549219675952704801087773144428044414693835844717445879609842
--   
@package rounded @version 0.1 -- | MPFR types. module Numeric.MPFR.Types -- | Version numbers. -- |
--   mpfr_t
--   
data MPFR MPFR :: !MPFRPrec -> !MPFRSign -> !MPFRExp -> !Ptr MPLimb -> MPFR [mpfrPrec] :: MPFR -> !MPFRPrec [mpfrSign] :: MPFR -> !MPFRSign [mpfrExp] :: MPFR -> !MPFRExp [mpfrD] :: MPFR -> !Ptr MPLimb -- |
--   mpfr_int
--   
newtype MPFRInt MPFRInt :: Int32 -> MPFRInt -- |
--   mpfr_uint
--   
newtype MPFRUInt MPFRUInt :: Word32 -> MPFRUInt -- |
--   mpfr_long
--   
newtype MPFRLong MPFRLong :: Int64 -> MPFRLong -- |
--   mpfr_ulong
--   
newtype MPFRULong MPFRULong :: Word64 -> MPFRULong -- |
--   mpfr_size_t
--   
newtype MPFRSize MPFRSize :: Word64 -> MPFRSize -- |
--   mpfr_prec_t
--   
newtype MPFRPrec MPFRPrec :: Int64 -> MPFRPrec -- |
--   mpfr_uprec_t
--   
newtype MPFRUPrec MPFRUPrec :: Word64 -> MPFRUPrec -- |
--   mpfr_sign_t
--   
newtype MPFRSign MPFRSign :: Int32 -> MPFRSign -- |
--   mpfr_exp_t
--   
newtype MPFRExp MPFRExp :: Int64 -> MPFRExp -- |
--   mpfr_uexp_t
--   
newtype MPFRUExp MPFRUExp :: Word64 -> MPFRUExp -- |
--   mpfr_rnd_t
--   
newtype MPFRRnd MPFRRnd :: Int32 -> MPFRRnd -- | round to nearest, with ties to even -- | round toward zero -- | round toward +Inf -- | round toward -Inf -- | round away from zero -- | faithful rounding (not implemented yet) -- | round to nearest, with ties away from zero (mpfr_round) (do not use) -- |
--   mpfr_kind_t
--   
newtype MPFRKind MPFRKind :: Word32 -> MPFRKind instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRKind instance Data.Data.Data Numeric.MPFR.Types.MPFRKind instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRKind instance Data.Bits.Bits Numeric.MPFR.Types.MPFRKind instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRKind instance GHC.Real.Real Numeric.MPFR.Types.MPFRKind instance GHC.Real.Integral Numeric.MPFR.Types.MPFRKind instance GHC.Num.Num Numeric.MPFR.Types.MPFRKind instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRKind instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRKind instance GHC.Show.Show Numeric.MPFR.Types.MPFRKind instance GHC.Read.Read Numeric.MPFR.Types.MPFRKind instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRKind instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRKind instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRRnd instance Data.Data.Data Numeric.MPFR.Types.MPFRRnd instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRRnd instance Data.Bits.Bits Numeric.MPFR.Types.MPFRRnd instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRRnd instance GHC.Real.Real Numeric.MPFR.Types.MPFRRnd instance GHC.Real.Integral Numeric.MPFR.Types.MPFRRnd instance GHC.Num.Num Numeric.MPFR.Types.MPFRRnd instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRRnd instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRRnd instance GHC.Show.Show Numeric.MPFR.Types.MPFRRnd instance GHC.Read.Read Numeric.MPFR.Types.MPFRRnd instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRRnd instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRRnd instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRUExp instance Data.Data.Data Numeric.MPFR.Types.MPFRUExp instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRUExp instance Data.Bits.Bits Numeric.MPFR.Types.MPFRUExp instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRUExp instance GHC.Real.Real Numeric.MPFR.Types.MPFRUExp instance GHC.Real.Integral Numeric.MPFR.Types.MPFRUExp instance GHC.Num.Num Numeric.MPFR.Types.MPFRUExp instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRUExp instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRUExp instance GHC.Show.Show Numeric.MPFR.Types.MPFRUExp instance GHC.Read.Read Numeric.MPFR.Types.MPFRUExp instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRUExp instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRUExp instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRExp instance Data.Data.Data Numeric.MPFR.Types.MPFRExp instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRExp instance Data.Bits.Bits Numeric.MPFR.Types.MPFRExp instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRExp instance GHC.Real.Real Numeric.MPFR.Types.MPFRExp instance GHC.Real.Integral Numeric.MPFR.Types.MPFRExp instance GHC.Num.Num Numeric.MPFR.Types.MPFRExp instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRExp instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRExp instance GHC.Show.Show Numeric.MPFR.Types.MPFRExp instance GHC.Read.Read Numeric.MPFR.Types.MPFRExp instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRExp instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRExp instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRSign instance Data.Data.Data Numeric.MPFR.Types.MPFRSign instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRSign instance Data.Bits.Bits Numeric.MPFR.Types.MPFRSign instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRSign instance GHC.Real.Real Numeric.MPFR.Types.MPFRSign instance GHC.Real.Integral Numeric.MPFR.Types.MPFRSign instance GHC.Num.Num Numeric.MPFR.Types.MPFRSign instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRSign instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRSign instance GHC.Show.Show Numeric.MPFR.Types.MPFRSign instance GHC.Read.Read Numeric.MPFR.Types.MPFRSign instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRSign instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRSign instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRUPrec instance Data.Data.Data Numeric.MPFR.Types.MPFRUPrec instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRUPrec instance Data.Bits.Bits Numeric.MPFR.Types.MPFRUPrec instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRUPrec instance GHC.Real.Real Numeric.MPFR.Types.MPFRUPrec instance GHC.Real.Integral Numeric.MPFR.Types.MPFRUPrec instance GHC.Num.Num Numeric.MPFR.Types.MPFRUPrec instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRUPrec instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRUPrec instance GHC.Show.Show Numeric.MPFR.Types.MPFRUPrec instance GHC.Read.Read Numeric.MPFR.Types.MPFRUPrec instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRUPrec instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRUPrec instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRPrec instance Data.Data.Data Numeric.MPFR.Types.MPFRPrec instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRPrec instance Data.Bits.Bits Numeric.MPFR.Types.MPFRPrec instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRPrec instance GHC.Real.Real Numeric.MPFR.Types.MPFRPrec instance GHC.Real.Integral Numeric.MPFR.Types.MPFRPrec instance GHC.Num.Num Numeric.MPFR.Types.MPFRPrec instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRPrec instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRPrec instance GHC.Show.Show Numeric.MPFR.Types.MPFRPrec instance GHC.Read.Read Numeric.MPFR.Types.MPFRPrec instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRPrec instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRPrec instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRSize instance Data.Data.Data Numeric.MPFR.Types.MPFRSize instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRSize instance Data.Bits.Bits Numeric.MPFR.Types.MPFRSize instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRSize instance GHC.Real.Real Numeric.MPFR.Types.MPFRSize instance GHC.Real.Integral Numeric.MPFR.Types.MPFRSize instance GHC.Num.Num Numeric.MPFR.Types.MPFRSize instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRSize instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRSize instance GHC.Show.Show Numeric.MPFR.Types.MPFRSize instance GHC.Read.Read Numeric.MPFR.Types.MPFRSize instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRSize instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRSize instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRULong instance Data.Data.Data Numeric.MPFR.Types.MPFRULong instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRULong instance Data.Bits.Bits Numeric.MPFR.Types.MPFRULong instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRULong instance GHC.Real.Real Numeric.MPFR.Types.MPFRULong instance GHC.Real.Integral Numeric.MPFR.Types.MPFRULong instance GHC.Num.Num Numeric.MPFR.Types.MPFRULong instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRULong instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRULong instance GHC.Show.Show Numeric.MPFR.Types.MPFRULong instance GHC.Read.Read Numeric.MPFR.Types.MPFRULong instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRULong instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRULong instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRLong instance Data.Data.Data Numeric.MPFR.Types.MPFRLong instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRLong instance Data.Bits.Bits Numeric.MPFR.Types.MPFRLong instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRLong instance GHC.Real.Real Numeric.MPFR.Types.MPFRLong instance GHC.Real.Integral Numeric.MPFR.Types.MPFRLong instance GHC.Num.Num Numeric.MPFR.Types.MPFRLong instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRLong instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRLong instance GHC.Show.Show Numeric.MPFR.Types.MPFRLong instance GHC.Read.Read Numeric.MPFR.Types.MPFRLong instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRLong instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRLong instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRUInt instance Data.Data.Data Numeric.MPFR.Types.MPFRUInt instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRUInt instance Data.Bits.Bits Numeric.MPFR.Types.MPFRUInt instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRUInt instance GHC.Real.Real Numeric.MPFR.Types.MPFRUInt instance GHC.Real.Integral Numeric.MPFR.Types.MPFRUInt instance GHC.Num.Num Numeric.MPFR.Types.MPFRUInt instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRUInt instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRUInt instance GHC.Show.Show Numeric.MPFR.Types.MPFRUInt instance GHC.Read.Read Numeric.MPFR.Types.MPFRUInt instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRUInt instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRUInt instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFRInt instance Data.Data.Data Numeric.MPFR.Types.MPFRInt instance Data.Bits.FiniteBits Numeric.MPFR.Types.MPFRInt instance Data.Bits.Bits Numeric.MPFR.Types.MPFRInt instance GHC.Arr.Ix Numeric.MPFR.Types.MPFRInt instance GHC.Real.Real Numeric.MPFR.Types.MPFRInt instance GHC.Real.Integral Numeric.MPFR.Types.MPFRInt instance GHC.Num.Num Numeric.MPFR.Types.MPFRInt instance GHC.Enum.Bounded Numeric.MPFR.Types.MPFRInt instance GHC.Enum.Enum Numeric.MPFR.Types.MPFRInt instance GHC.Show.Show Numeric.MPFR.Types.MPFRInt instance GHC.Read.Read Numeric.MPFR.Types.MPFRInt instance GHC.Classes.Ord Numeric.MPFR.Types.MPFRInt instance GHC.Classes.Eq Numeric.MPFR.Types.MPFRInt instance Foreign.Storable.Storable Numeric.MPFR.Types.MPFR -- | This module contains FFI imports as unsafe ccalls. module Numeric.MPFR.Raw.Unsafe mpfr_init2 :: Ptr MPFR -> MPFRPrec -> IO () mpfr_clear :: Ptr MPFR -> IO () mpfr_sgn :: Ptr MPFR -> IO CInt mpfr_get_d :: Ptr MPFR -> MPFRRnd -> IO Double wrapped_mpfr_get_z :: Ptr MPZ -> Ptr MPFR -> MPFRRnd -> Ptr CInt -> IO CInt mpfr_get_str :: Ptr CChar -> Ptr MPFRExp -> Int -> CSize -> Ptr MPFR -> MPFRRnd -> IO (Ptr CChar) mpfr_free_str :: Ptr CChar -> IO () mpfr_set_z :: Ptr MPFR -> Ptr MPZ -> MPFRRnd -> IO CInt mpfr_set_sj :: Ptr MPFR -> CIntMax -> MPFRRnd -> IO CInt mpfr_set_q :: Ptr MPFR -> Ptr MPQ -> MPFRRnd -> IO CInt mpfr_set_d :: Ptr MPFR -> Double -> MPFRRnd -> IO CInt type Test = Ptr MPFR -> IO CInt mpfr_nan_p :: Test mpfr_inf_p :: Test mpfr_zero_p :: Test mpfr_signbit :: Test wrapped_mpfr_get_z_2exp :: Ptr MPZ -> Ptr MPFR -> Ptr CInt -> IO MPFRExp mpfr_set_z_2exp :: Ptr MPFR -> Ptr MPZ -> MPFRExp -> MPFRRnd -> IO CInt type Constant = Ptr MPFR -> MPFRRnd -> IO CInt mpfr_const_pi :: Constant mpfr_const_log2 :: Constant mpfr_const_euler :: Constant mpfr_const_catalan :: Constant type Unary = Ptr MPFR -> Ptr MPFR -> MPFRRnd -> IO CInt mpfr_set :: Unary mpfr_abs :: Unary mpfr_neg :: Unary mpfr_log :: Unary mpfr_exp :: Unary mpfr_sqrt :: Unary mpfr_sin :: Unary mpfr_cos :: Unary mpfr_tan :: Unary mpfr_asin :: Unary mpfr_acos :: Unary mpfr_atan :: Unary mpfr_sinh :: Unary mpfr_cosh :: Unary mpfr_tanh :: Unary mpfr_asinh :: Unary mpfr_acosh :: Unary mpfr_atanh :: Unary mpfr_log1p :: Unary mpfr_expm1 :: Unary mpfr_rint :: Unary type Unary' = Ptr MPFR -> Ptr MPFR -> IO CInt mpfr_trunc :: Unary' mpfr_ceil :: Unary' mpfr_floor :: Unary' type Binary = Ptr MPFR -> Ptr MPFR -> Ptr MPFR -> MPFRRnd -> IO CInt mpfr_add :: Binary mpfr_sub :: Binary mpfr_mul :: Binary mpfr_div :: Binary mpfr_min :: Binary mpfr_max :: Binary mpfr_atan2 :: Binary mpfr_modf :: Binary type Comparison = Ptr MPFR -> Ptr MPFR -> IO CInt mpfr_cmp :: Comparison mpfr_equal_p :: Comparison mpfr_lessgreater_p :: Comparison mpfr_less_p :: Comparison mpfr_greater_p :: Comparison mpfr_lessequal_p :: Comparison mpfr_greaterequal_p :: Comparison mpfr_nextabove :: Ptr MPFR -> IO () mpfr_nextbelow :: Ptr MPFR -> IO () wrapped_mpfr_get_ld :: Ptr LongDouble -> Ptr MPFR -> MPFRRnd -> Ptr CInt -> IO CInt wrapped_mpfr_get_ld_2exp :: Ptr LongDouble -> Ptr CLong -> Ptr MPFR -> MPFRRnd -> Ptr CInt -> IO CInt wrapped_mpfr_set_ld :: Ptr MPFR -> Ptr LongDouble -> MPFRRnd -> IO CInt wrapped_mpfr_cmp_ld :: Ptr MPFR -> Ptr LongDouble -> IO CInt -- | This module contains FFI imports as safe ccalls. module Numeric.MPFR.Raw.Safe mpfr_init2 :: Ptr MPFR -> MPFRPrec -> IO () mpfr_clear :: Ptr MPFR -> IO () mpfr_sgn :: Ptr MPFR -> IO CInt mpfr_get_d :: Ptr MPFR -> MPFRRnd -> IO Double wrapped_mpfr_get_z :: Ptr MPZ -> Ptr MPFR -> MPFRRnd -> Ptr CInt -> IO CInt mpfr_get_str :: Ptr CChar -> Ptr MPFRExp -> Int -> CSize -> Ptr MPFR -> MPFRRnd -> IO (Ptr CChar) mpfr_free_str :: Ptr CChar -> IO () mpfr_set_z :: Ptr MPFR -> Ptr MPZ -> MPFRRnd -> IO CInt mpfr_set_sj :: Ptr MPFR -> CIntMax -> MPFRRnd -> IO CInt mpfr_set_q :: Ptr MPFR -> Ptr MPQ -> MPFRRnd -> IO CInt mpfr_set_d :: Ptr MPFR -> Double -> MPFRRnd -> IO CInt type Test = Ptr MPFR -> IO CInt mpfr_nan_p :: Test mpfr_inf_p :: Test mpfr_zero_p :: Test mpfr_signbit :: Test wrapped_mpfr_get_z_2exp :: Ptr MPZ -> Ptr MPFR -> Ptr CInt -> IO MPFRExp mpfr_set_z_2exp :: Ptr MPFR -> Ptr MPZ -> MPFRExp -> MPFRRnd -> IO CInt type Constant = Ptr MPFR -> MPFRRnd -> IO CInt mpfr_const_pi :: Constant mpfr_const_log2 :: Constant mpfr_const_euler :: Constant mpfr_const_catalan :: Constant type Unary = Ptr MPFR -> Ptr MPFR -> MPFRRnd -> IO CInt mpfr_set :: Unary mpfr_abs :: Unary mpfr_neg :: Unary mpfr_log :: Unary mpfr_exp :: Unary mpfr_sqrt :: Unary mpfr_sin :: Unary mpfr_cos :: Unary mpfr_tan :: Unary mpfr_asin :: Unary mpfr_acos :: Unary mpfr_atan :: Unary mpfr_sinh :: Unary mpfr_cosh :: Unary mpfr_tanh :: Unary mpfr_asinh :: Unary mpfr_acosh :: Unary mpfr_atanh :: Unary mpfr_log1p :: Unary mpfr_expm1 :: Unary mpfr_rint :: Unary type Unary' = Ptr MPFR -> Ptr MPFR -> IO CInt mpfr_trunc :: Unary' mpfr_ceil :: Unary' mpfr_floor :: Unary' type Binary = Ptr MPFR -> Ptr MPFR -> Ptr MPFR -> MPFRRnd -> IO CInt mpfr_add :: Binary mpfr_sub :: Binary mpfr_mul :: Binary mpfr_div :: Binary mpfr_min :: Binary mpfr_max :: Binary mpfr_atan2 :: Binary mpfr_modf :: Binary type Comparison = Ptr MPFR -> Ptr MPFR -> IO CInt mpfr_cmp :: Comparison mpfr_equal_p :: Comparison mpfr_lessgreater_p :: Comparison mpfr_less_p :: Comparison mpfr_greater_p :: Comparison mpfr_lessequal_p :: Comparison mpfr_greaterequal_p :: Comparison mpfr_nextabove :: Ptr MPFR -> IO () mpfr_nextbelow :: Ptr MPFR -> IO () wrapped_mpfr_get_ld :: Ptr LongDouble -> Ptr MPFR -> MPFRRnd -> Ptr CInt -> IO CInt wrapped_mpfr_get_ld_2exp :: Ptr LongDouble -> Ptr CLong -> Ptr MPFR -> MPFRRnd -> Ptr CInt -> IO CInt wrapped_mpfr_set_ld :: Ptr MPFR -> Ptr LongDouble -> MPFRRnd -> IO CInt wrapped_mpfr_cmp_ld :: Ptr MPFR -> Ptr LongDouble -> IO CInt -- | This module contains FFI imports. In a future release they may switch -- at runtime between safe and unsafe calls depending on cost estimates, -- but for now thie module simply re-exports Safe. -- -- Note: beware issues with the GHC threaded runtime if you need the MPFR -- status flags (which use OS thread local storage aka TLS). Even if you -- use forkOS to create a bound thread whose FFI will all be done -- by the same OS thread, sparks created with par may run on a -- different OS thread and lead to unpredictable behaviour. module Numeric.MPFR.Raw module Numeric.Rounded -- | A properly rounded floating-point number with a given rounding mode -- and precision. -- -- You can coerce to change rounding modes, but not precision. data Rounded (r :: RoundingMode) p -- | Construct a properly rounded floating point number from an Int. fromInt :: (Rounding r, Precision p) => Int -> Rounded r p -- | Construct a rounded floating point number directly from a -- Double. fromDouble :: (Rounding r, Precision p) => Double -> Rounded r p -- | Construct a rounded floating point number directly from a -- LongDouble. fromLongDouble :: (Rounding r, Precision p) => LongDouble -> Rounded r p -- | Round to Double with the given rounding mode. toDouble :: (Rounding r, Precision p) => Rounded r p -> Double -- | Round to LongDouble with the given rounding mode. toLongDouble :: (Rounding r, Precision p) => Rounded r p -> LongDouble -- | Round to Integer using the specified rounding mode. Throws -- Overflow if the result cannot be represented (for example, -- infinities or NaN). toInteger' :: (Rounding r, Precision p) => Rounded r p -> Integer -- | Round to a different precision with the given rounding mode. precRound :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 -- | This class is used to specify the number of bits of precision that are -- maintained in the significand of a properly Rounded floating -- point number. class Precision p precision :: Precision p => proxy p -> Int data Bytes (n :: Nat) reifyPrecision :: Int -> (forall (p :: *). Precision p => Proxy p -> a) -> a class Rounding (r :: RoundingMode) rounding :: Rounding r => Proxy r -> RoundingMode data RoundingMode -- | currently unsupported placeholder TowardNearestWithTiesAwayFromZero :: RoundingMode -- | roundTiesToEven in IEEE 754-2008 TowardNearest :: RoundingMode -- | roundTowardZero in IEEE 754-2008 TowardZero :: RoundingMode -- | roundTowardPositive in IEEE 754-2008 TowardInf :: RoundingMode -- | roundTowardNegative in IEEE 754-2008 TowardNegInf :: RoundingMode -- | round away from zero AwayFromZero :: RoundingMode -- | currently unsupported placeholder Faithfully :: RoundingMode reifyRounding :: RoundingMode -> (forall s. Rounding s => Proxy s -> r) -> r -- | Natural logarithm of 2 kLog2 :: (Rounding r, Precision p) => Rounded r p -- |
    --
  1. 577...
  2. --
kEuler :: (Rounding r, Precision p) => Rounded r p -- |
    --
  1. 915...
  2. --
kCatalan :: (Rounding r, Precision p) => Rounded r p (.+.) :: Rounding r => Rounded r p -> Rounded r p -> Rounded r p infixl 6 .+. (.-.) :: Rounding r => Rounded r p -> Rounded r p -> Rounded r p infixl 6 .-. (.*.) :: Rounding r => Rounded r p -> Rounded r p -> Rounded r p infixl 7 .*. abs' :: Rounded r p -> Rounded r p negate' :: Rounded r p -> Rounded r p decodeFloat' :: Rounded r p -> (Integer, Int) succUlp :: Rounded r p -> Rounded r p predUlp :: Rounded r p -> Rounded r p (!+!) :: (Rounding r, Precision p1, Precision p2, Precision p3) => Rounded r p1 -> Rounded r p2 -> Rounded r p3 infixl 6 !+! (!-!) :: (Rounding r, Precision p1, Precision p2, Precision p3) => Rounded r p1 -> Rounded r p2 -> Rounded r p3 infixl 6 !-! (!*!) :: (Rounding r, Precision p1, Precision p2, Precision p3) => Rounded r p1 -> Rounded r p2 -> Rounded r p3 infixl 7 !*! (!/!) :: (Rounding r, Precision p1, Precision p2, Precision p3) => Rounded r p1 -> Rounded r p2 -> Rounded r p3 infixl 7 !/! abs_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 negate_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 compare_ :: (Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 -> Ordering (!==!) :: (Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 -> Bool infix 4 !==! (!/=!) :: (Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 -> Bool infix 4 !/=! (!>=!) :: (Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 -> Bool infix 4 !>=! (!<=!) :: (Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 -> Bool infix 4 !<=! (!>!) :: (Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 -> Bool infix 4 !>! (! Rounded r p1 -> Rounded r p2 -> Bool infix 4 ! Rounded r p1 -> Rounded r p2 -> Rounded r p3 max_ :: (Rounding r, Precision p1, Precision p2, Precision p3) => Rounded r p1 -> Rounded r p2 -> Rounded r p3 sqrt_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 exp_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 expm1_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 log_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 log1p_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 sin_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 cos_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 tan_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 asin_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 acos_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 atan_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 atan2_ :: (Rounding r, Precision p1, Precision p2, Precision p3) => Rounded r p1 -> Rounded r p2 -> Rounded r p3 sinh_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 cosh_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 tanh_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 asinh_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 acosh_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 atanh_ :: (Rounding r, Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 truncate_ :: (Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 round_ :: (Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 ceiling_ :: (Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 floor_ :: (Precision p1, Precision p2) => Rounded r p1 -> Rounded r p2 -- | Use a value as a constant mpfr_t (attempts to modify -- it may explode, changing the precision will explode). withInRounded :: Rounded r p -> (Ptr MPFR -> IO a) -> IO a -- | Allocates and initializes a new mpfr_t to the value. If the -- precision matches after the action then it is peeked and returned. -- Otherwise you get Nothing. withInOutRounded :: Precision p => Rounded r p -> (Ptr MPFR -> IO a) -> IO (Maybe (Rounded r p), a) -- | Allocates and initializes a new mpfr_t to the value. If the -- precision matches after the action then it is peeked and returned. -- Otherwise you get Nothing. The result ot the action is ignored. withInOutRounded_ :: Precision p => Rounded r p -> (Ptr MPFR -> IO a) -> IO (Maybe (Rounded r p)) -- | Allocates and initializes a new mpfr_t, if the precision -- matches after the action then it is peeked and returned. Otherwise you -- get Nothing. withOutRounded :: Precision p => (Ptr MPFR -> IO a) -> IO (Maybe (Rounded r p), a) -- | Allocates and initializes a new mpfr_t, if the precision -- matches after the action then it is peeked and returned. Otherwise you -- get Nothing. The result of the action is ignored. withOutRounded_ :: Precision p => (Ptr MPFR -> IO a) -> IO (Maybe (Rounded r p)) -- | Like withOutRounded but with the limbs allocated by GHC, which -- should be slightly faster. However, it will crash if MPFR tries to -- reallocate the limbs, so the action must not try to change the -- precision or clear it, etc. unsafeWithOutRounded :: Precision p => (Ptr MPFR -> IO a) -> IO (Maybe (Rounded r p), a) -- | Like withOutRounded_ but with the limbs allocated by GHC, which -- should be slightly faster. However, it will crash if MPFR tries to -- reallocate the limbs, so the action must not try to change the -- precision or clear it, etc. unsafeWithOutRounded_ :: Precision p => (Ptr MPFR -> IO a) -> IO (Maybe (Rounded r p)) -- | Peek an mpfr_t at its actual precision, reified. peekRounded :: Rounding r => Ptr MPFR -> (forall (p :: *). Precision p => Rounded r p -> IO a) -> IO a module Numeric.Rounded.Interval data Interval p I :: Rounded TowardNegInf p -> Rounded TowardInf p -> Interval p Empty :: Interval p fmod :: RealFrac a => a -> a -> a -- | lift a monotone increasing function over a given interval increasing :: (forall r. Rounding r => Rounded r a -> Rounded r b) -> Interval a -> Interval b decreasing :: (forall r. Rounding r => Rounded r a -> Rounded r b) -> Interval a -> Interval b (...) :: Rounded TowardNegInf p -> Rounded TowardInf p -> Interval p (+/-) :: Rounded r p -> Rounded r' p -> Interval p infixl 6 +/- negInfinity :: Fractional a => a posInfinity :: Fractional a => a -- | create a non-empty interval or fail interval :: Rounded TowardNegInf p -> Rounded TowardInf p -> Maybe (Interval p) -- | The whole real number line -- --
--   >>> whole
--   -Infinity ... Infinity
--   
whole :: Precision p => Interval p -- | An empty interval -- --
--   >>> empty
--   Empty
--   
empty :: Interval p -- | Check if an interval is empty -- --
--   >>> null (1 ... 5)
--   False
--   
-- --
--   >>> null (1 ... 1)
--   False
--   
-- --
--   >>> null empty
--   True
--   
null :: Interval p -> Bool -- | The infimum (lower bound) of an interval -- --
--   >>> inf (1.0 ... 20.0)
--   1.0
--   
-- --
--   >>> inf empty
--   *** Exception: empty interval
--   
inf :: Interval p -> Rounded TowardNegInf p -- | The supremum (upper bound) of an interval -- --
--   >>> sup (1.0 ... 20.0)
--   20.0
--   
-- --
--   >>> sup empty
--   *** Exception: empty interval
--   
sup :: Interval p -> Rounded TowardInf p -- | Is the interval a singleton point? N.B. This is fairly fragile and -- likely will not hold after even a few operations that only involve -- singletons -- --
--   >>> singular (singleton 1)
--   True
--   
-- --
--   >>> singular (1.0 ... 20.0)
--   False
--   
singular :: Interval p -> Bool -- | Calculate the width of an interval. -- --
--   >>> width (1 ... 20)
--   19 ... 19
--   
-- --
--   >>> width (singleton 1)
--   0 ... 0
--   
-- --
--   >>> width empty
--   0 ... 0
--   
width :: Precision p => Interval p -> Rounded TowardInf p -- | Magnitude -- --
--   >>> magnitude (1 ... 20)
--   20
--   
-- --
--   >>> magnitude (-20 ... 10)
--   20
--   
-- --
--   >>> magnitude (singleton 5)
--   5
--   
-- -- throws EmptyInterval if the interval is empty. -- --
--   >>> magnitude empty
--   *** Exception: empty interval
--   
magnitude :: Precision p => Interval p -> Rounded TowardInf p -- | "mignitude" -- --
--   >>> mignitude (1 ... 20)
--   1
--   
-- --
--   >>> mignitude (-20 ... 10)
--   0
--   
-- --
--   >>> mignitude (singleton 5)
--   5
--   
-- -- throws EmptyInterval if the interval is empty. -- --
--   >>> mignitude empty
--   *** Exception: empty interval
--   
mignitude :: Precision p => Interval p -> Rounded TowardNegInf p -- | Construct a symmetric interval. -- --
--   >>> symmetric 3
--   -3 ... 3
--   
symmetric :: Rounded TowardInf p -> Interval p -- | Hausdorff distance between intervals. -- --
--   >>> distance (1 ... 7) (6 ... 10)
--   0
--   
-- --
--   >>> distance (1 ... 7) (15 ... 24)
--   8
--   
-- --
--   >>> distance (1 ... 7) (-10 ... -2)
--   3
--   
-- --
--   >>> distance Empty (1 ... 1)
--   *** Exception: empty interval
--   
distance :: Precision p => Interval p -> Interval p -> Rounded TowardNegInf p -- | Inflate an interval by enlarging it at both ends. -- --
--   >>> inflate 3 (-1 ... 7)
--   -4 ... 10
--   
-- --
--   >>> inflate (-2) (0 ... 4)
--   -2 ... 6
--   
-- --
--   >>> inflate 1 empty
--   Empty
--   
inflate :: Precision p => Rounded TowardInf p -> Interval p -> Interval p -- | For all x in X, y in Y. x -- < y -- --
--   >>> (5 ... 10 :: Interval Double) <! (20 ... 30 :: Interval Double)
--   True
--   
-- --
--   >>> (5 ... 10 :: Interval Double) <! (10 ... 30 :: Interval Double)
--   False
--   
-- --
--   >>> (20 ... 30 :: Interval Double) <! (5 ... 10 :: Interval Double)
--   False
--   
( Interval p -> Interval p -> Bool -- | For all x in X, y in Y. x -- <= y -- --
--   >>> (5 ... 10 :: Interval Double) <=! (20 ... 30 :: Interval Double)
--   True
--   
-- --
--   >>> (5 ... 10 :: Interval Double) <=! (10 ... 30 :: Interval Double)
--   True
--   
-- --
--   >>> (20 ... 30 :: Interval Double) <=! (5 ... 10 :: Interval Double)
--   False
--   
(<=!) :: Precision p => Interval p -> Interval p -> Bool -- | For all x in X, y in Y. x -- == y -- -- Only singleton intervals or empty intervals can return true -- --
--   >>> (singleton 5 :: Interval Double) ==! (singleton 5 :: Interval Double)
--   True
--   
-- --
--   >>> (5 ... 10 :: Interval Double) ==! (5 ... 10 :: Interval Double)
--   False
--   
(==!) :: Interval p -> Interval p -> Bool -- | For all x in X, y in Y. x -- /= y -- --
--   >>> (5 ... 15 :: Interval Double) /=! (20 ... 40 :: Interval Double)
--   True
--   
-- --
--   >>> (5 ... 15 :: Interval Double) /=! (15 ... 40 :: Interval Double)
--   False
--   
(/=!) :: Interval p -> Interval p -> Bool -- | For all x in X, y in Y. x -- > y -- --
--   >>> (20 ... 40 :: Interval Double) >! (10 ... 19 :: Interval Double)
--   True
--   
-- --
--   >>> (5 ... 20 :: Interval Double) >! (15 ... 40 :: Interval Double)
--   False
--   
(>!) :: Precision p => Interval p -> Interval p -> Bool -- | For all x in X, y in Y. x -- >= y -- --
--   >>> (20 ... 40 :: Interval Double) >=! (10 ... 20 :: Interval Double)
--   True
--   
-- --
--   >>> (5 ... 20 :: Interval Double) >=! (15 ... 40 :: Interval Double)
--   False
--   
(>=!) :: Precision p => Interval p -> Interval p -> Bool -- | Determine if a point is in the interval. -- --
--   >>> elem 3.2 (1 ... 5)
--   True
--   
-- --
--   >>> elem 5 (1 ... 5)
--   True
--   
-- --
--   >>> elem 1 (1 ... 5)
--   True
--   
-- --
--   >>> elem 8 (1 ... 5)
--   False
--   
-- --
--   >>> elem 5 empty
--   False
--   
elem :: Rounded TowardZero p -> Interval p -> Bool -- | Determine if a point is not included in the interval -- --
--   >>> notElem 8 (1.0 ... 5.0)
--   True
--   
-- --
--   >>> notElem 1.4 (1.0 ... 5.0)
--   False
--   
-- -- And of course, nothing is a member of the empty interval. -- --
--   >>> notElem 5 empty
--   True
--   
notElem :: Rounded TowardZero p -> Interval p -> Bool -- | For all x in X, y in Y. x -- op y certainly :: Precision p => (forall b. Ord b => b -> b -> Bool) -> Interval p -> Interval p -> Bool -- | Does there exist an x in X, y in Y -- such that x < y? ( Interval p -> Interval p -> Bool -- | Does there exist an x in X, y in Y -- such that x <= y? (<=?) :: Precision p => Interval p -> Interval p -> Bool -- | Does there exist an x in X, y in Y -- such that x == y? (==?) :: Interval a -> Interval a -> Bool -- | Does there exist an x in X, y in Y -- such that x /= y? (/=?) :: Interval a -> Interval a -> Bool -- | Does there exist an x in X, y in Y -- such that x > y? (>?) :: Precision p => Interval p -> Interval p -> Bool -- | Does there exist an x in X, y in Y -- such that x >= y? (>=?) :: Precision p => Interval p -> Interval p -> Bool -- | Does there exist an x in X, y in Y -- such that x op y? possibly :: Precision p => (forall b. Ord b => b -> b -> Bool) -> Interval p -> Interval p -> Bool -- | Check if interval X totally contains interval Y -- --
--   >>> (20 ... 40 :: Interval Double) `contains` (25 ... 35 :: Interval Double)
--   True
--   
-- --
--   >>> (20 ... 40 :: Interval Double) `contains` (15 ... 35 :: Interval Double)
--   False
--   
contains :: Precision p => Interval p -> Interval p -> Bool -- | Flipped version of contains. Check if interval X a -- subset of interval Y -- --
--   >>> (25 ... 35 :: Interval Double) `isSubsetOf` (20 ... 40 :: Interval Double)
--   True
--   
-- --
--   >>> (20 ... 40 :: Interval Double) `isSubsetOf` (15 ... 35 :: Interval Double)
--   False
--   
isSubsetOf :: Precision p => Interval p -> Interval p -> Bool -- | Calculate the intersection of two intervals. -- --
--   >>> intersection (1 ... 10 :: Interval Double) (5 ... 15 :: Interval Double)
--   5.0 ... 10.0
--   
intersection :: Precision p => Interval p -> Interval p -> Interval p -- | Calculate the convex hull of two intervals -- --
--   >>> hull (0 ... 10 :: Interval Double) (5 ... 15 :: Interval Double)
--   0.0 ... 15.0
--   
-- --
--   >>> hull (15 ... 85 :: Interval Double) (0 ... 10 :: Interval Double)
--   0.0 ... 85.0
--   
hull :: Precision p => Interval p -> Interval p -> Interval p -- | Bisect an interval at its midpoint. -- --
--   >>> bisect (10.0 ... 20.0)
--   (10.0 ... 15.0,15.0 ... 20.0)
--   
-- --
--   >>> bisect (singleton 5.0)
--   (5.0 ... 5.0,5.0 ... 5.0)
--   
-- --
--   >>> bisect Empty
--   (Empty,Empty)
--   
bisect :: Precision p => Interval p -> (Interval p, Interval p) divNonZero :: Precision p => Interval p -> Interval p -> Interval p divPositive :: Precision p => Interval p -> Rounded TowardInf p -> Interval p divNegative :: Precision p => Interval p -> Rounded TowardNegInf p -> Interval p divZero :: Precision p => Interval p -> Interval p midpoint :: Precision p => Interval p -> Rounded TowardNegInf p instance forall k (p :: k). GHC.Generics.Generic (Numeric.Rounded.Interval.Interval p) instance forall k (p :: k). Numeric.Rounded.Precision.Precision p => GHC.Num.Num (Numeric.Rounded.Interval.Interval p) instance forall k (p :: k). GHC.Classes.Eq (Numeric.Rounded.Interval.Interval p) instance forall k (p :: k). Numeric.Rounded.Precision.Precision p => GHC.Classes.Ord (Numeric.Rounded.Interval.Interval p) instance forall k (p :: k). Numeric.Rounded.Precision.Precision p => GHC.Real.Real (Numeric.Rounded.Interval.Interval p) instance forall k (p :: k). Numeric.Rounded.Precision.Precision p => GHC.Show.Show (Numeric.Rounded.Interval.Interval p) instance forall k (p :: k). Numeric.Rounded.Precision.Precision p => GHC.Real.Fractional (Numeric.Rounded.Interval.Interval p) instance forall k (p :: k). Numeric.Rounded.Precision.Precision p => GHC.Real.RealFrac (Numeric.Rounded.Interval.Interval p) instance forall k (p :: k). Numeric.Rounded.Precision.Precision p => GHC.Float.Floating (Numeric.Rounded.Interval.Interval p) -- | This module provides an interface without advanced type system -- features, that may be more convenient if the precision is changed -- often. module Numeric.Rounded.Simple -- | A properly rounded floating-point number with a given rounding mode -- and precision. data Rounded reifyRounded :: Rounded -> (forall p. Precision p => Rounded r p -> a) -> a simplify :: Rounded r p -> Rounded fromInt :: RoundingMode -> Precision -> Int -> Rounded fromDouble :: RoundingMode -> Precision -> Double -> Rounded fromLongDouble :: RoundingMode -> Precision -> LongDouble -> Rounded toDouble :: RoundingMode -> Rounded -> Double toLongDouble :: RoundingMode -> Rounded -> LongDouble toInteger' :: RoundingMode -> Rounded -> Integer precRound :: RoundingMode -> Precision -> Rounded -> Rounded type Precision = Int precision :: Rounded -> Precision data RoundingMode -- | currently unsupported placeholder TowardNearestWithTiesAwayFromZero :: RoundingMode -- | roundTiesToEven in IEEE 754-2008 TowardNearest :: RoundingMode -- | roundTowardZero in IEEE 754-2008 TowardZero :: RoundingMode -- | roundTowardPositive in IEEE 754-2008 TowardInf :: RoundingMode -- | roundTowardNegative in IEEE 754-2008 TowardNegInf :: RoundingMode -- | round away from zero AwayFromZero :: RoundingMode -- | currently unsupported placeholder Faithfully :: RoundingMode kPi :: RoundingMode -> Precision -> Rounded kLog2 :: RoundingMode -> Precision -> Rounded kEuler :: RoundingMode -> Precision -> Rounded kCatalan :: RoundingMode -> Precision -> Rounded min_ :: RoundingMode -> Precision -> Rounded -> Rounded -> Rounded max_ :: RoundingMode -> Precision -> Rounded -> Rounded -> Rounded add_ :: RoundingMode -> Precision -> Rounded -> Rounded -> Rounded sub_ :: RoundingMode -> Precision -> Rounded -> Rounded -> Rounded mul_ :: RoundingMode -> Precision -> Rounded -> Rounded -> Rounded negate_ :: RoundingMode -> Precision -> Rounded -> Rounded abs_ :: RoundingMode -> Precision -> Rounded -> Rounded fromInteger' :: RoundingMode -> Precision -> Integer -> Rounded div_ :: RoundingMode -> Precision -> Rounded -> Rounded -> Rounded fromRational' :: RoundingMode -> Precision -> Rational -> Rounded toRational' :: RoundingMode -> Rounded -> Rational properFraction_ :: Integral i => Rounded -> (i, Rounded) truncate_ :: Precision -> Rounded -> Rounded round_ :: Precision -> Rounded -> Rounded ceiling_ :: Precision -> Rounded -> Rounded floor_ :: Precision -> Rounded -> Rounded sqrt_ :: RoundingMode -> Precision -> Rounded -> Rounded exp_ :: RoundingMode -> Precision -> Rounded -> Rounded expm1_ :: RoundingMode -> Precision -> Rounded -> Rounded log_ :: RoundingMode -> Precision -> Rounded -> Rounded log1p_ :: RoundingMode -> Precision -> Rounded -> Rounded sin_ :: RoundingMode -> Precision -> Rounded -> Rounded cos_ :: RoundingMode -> Precision -> Rounded -> Rounded tan_ :: RoundingMode -> Precision -> Rounded -> Rounded asin_ :: RoundingMode -> Precision -> Rounded -> Rounded acos_ :: RoundingMode -> Precision -> Rounded -> Rounded atan_ :: RoundingMode -> Precision -> Rounded -> Rounded sinh_ :: RoundingMode -> Precision -> Rounded -> Rounded cosh_ :: RoundingMode -> Precision -> Rounded -> Rounded tanh_ :: RoundingMode -> Precision -> Rounded -> Rounded asinh_ :: RoundingMode -> Precision -> Rounded -> Rounded acosh_ :: RoundingMode -> Precision -> Rounded -> Rounded atanh_ :: RoundingMode -> Precision -> Rounded -> Rounded atan2_ :: RoundingMode -> Precision -> Rounded -> Rounded -> Rounded floatRadix' :: Rounded -> Integer floatDigits' :: Rounded -> Int floatRange' :: Rounded -> (Int, Int) decodeFloat' :: Rounded -> (Integer, Int) encodeFloat' :: RoundingMode -> Precision -> Integer -> Int -> Rounded exponent' :: Rounded -> Int significand' :: Rounded -> Rounded scaleFloat' :: Int -> Rounded -> Rounded isNaN' :: Rounded -> Bool isInfinite' :: Rounded -> Bool isDenormalized' :: Rounded -> Bool isNegativeZero' :: Rounded -> Bool isIEEE' :: Rounded -> Bool show' :: Rounded -> String read' :: RoundingMode -> Precision -> String -> Rounded -- | Use a value as a constant mpfr_t (attempts to modify -- it may explode, changing the precision will explode). withInRounded :: Rounded -> (Ptr MPFR -> IO a) -> IO a -- | Allocates and initializes a new mpfr_t to the value. After -- the action it is peeked and returned. withInOutRounded :: Rounded -> (Ptr MPFR -> IO a) -> IO (Rounded, a) -- | Allocates and initializes a new mpfr_t to the value. After -- the action it is peeked and returned. The result of the action is -- ignored. withInOutRounded_ :: Rounded -> (Ptr MPFR -> IO a) -> IO Rounded -- | Allocates and initializes a new mpfr_t, after the action it -- is peeked and returned. withOutRounded :: Precision -> (Ptr MPFR -> IO a) -> IO (Rounded, a) -- | Allocates and initializes a new mpfr_t, after the action it -- is peeked and returned. The result of the action is ignored. withOutRounded_ :: Precision -> (Ptr MPFR -> IO a) -> IO Rounded -- | Peek an mpfr_t at its actual precision. peekRounded :: Ptr MPFR -> IO Rounded instance GHC.Classes.Eq Numeric.Rounded.Simple.Rounded instance GHC.Classes.Ord Numeric.Rounded.Simple.Rounded