| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Numeric.Rounded.Hardware
Synopsis
- newtype Rounded (r :: RoundingMode) a = Rounded {
- getRounded :: a
- data RoundingMode
- class Rounding (r :: RoundingMode)
- class Ord a => RoundedRing a
- class RoundedRing a => RoundedFractional a
- class RoundedRing a => RoundedSqrt a
Documentation
newtype Rounded (r :: RoundingMode) a Source #
A type tagged with a rounding direction.
The rounding direction is effective for a single operation.
You won't get the correctly-rounded result for a compound expression like (a - b * c) :: Rounded 'TowardInf Double.
In particular, a negative literal like -0.1 :: Rounded r Double doesn't yield the correctly-rounded value for -0.1.
To get the correct value, call fromRational explicitly (i.e. fromRational (-0.1) :: Rounded r Double) or use NegativeLiterals extension.
Constructors
| Rounded | |
Fields
| |
Instances
data RoundingMode Source #
The type for IEEE754 rounding-direction attributes.
Constructors
| ToNearest | Round to the nearest value (IEEE754 roundTiesToEven) |
| TowardNegInf | Round downward (IEEE754 roundTowardNegative) |
| TowardInf | Round upward (IEEE754 roundTowardPositive) |
| TowardZero | Round toward zero (IEEE754 roundTowardZero) |
Instances
| Bounded RoundingMode Source # | |||||
Defined in Numeric.Rounded.Hardware.Internal.Rounding | |||||
| Enum RoundingMode Source # | |||||
Defined in Numeric.Rounded.Hardware.Internal.Rounding Methods succ :: RoundingMode -> RoundingMode # pred :: RoundingMode -> RoundingMode # toEnum :: Int -> RoundingMode # fromEnum :: RoundingMode -> Int # enumFrom :: RoundingMode -> [RoundingMode] # enumFromThen :: RoundingMode -> RoundingMode -> [RoundingMode] # enumFromTo :: RoundingMode -> RoundingMode -> [RoundingMode] # enumFromThenTo :: RoundingMode -> RoundingMode -> RoundingMode -> [RoundingMode] # | |||||
| Generic RoundingMode Source # | |||||
Defined in Numeric.Rounded.Hardware.Internal.Rounding Associated Types
| |||||
| Read RoundingMode Source # | |||||
Defined in Numeric.Rounded.Hardware.Internal.Rounding Methods readsPrec :: Int -> ReadS RoundingMode # readList :: ReadS [RoundingMode] # | |||||
| Show RoundingMode Source # | |||||
Defined in Numeric.Rounded.Hardware.Internal.Rounding Methods showsPrec :: Int -> RoundingMode -> ShowS # show :: RoundingMode -> String # showList :: [RoundingMode] -> ShowS # | |||||
| NFData RoundingMode Source # | |||||
Defined in Numeric.Rounded.Hardware.Internal.Rounding Methods rnf :: RoundingMode -> () # | |||||
| Eq RoundingMode Source # | |||||
Defined in Numeric.Rounded.Hardware.Internal.Rounding | |||||
| Ord RoundingMode Source # | |||||
Defined in Numeric.Rounded.Hardware.Internal.Rounding Methods compare :: RoundingMode -> RoundingMode -> Ordering # (<) :: RoundingMode -> RoundingMode -> Bool # (<=) :: RoundingMode -> RoundingMode -> Bool # (>) :: RoundingMode -> RoundingMode -> Bool # (>=) :: RoundingMode -> RoundingMode -> Bool # max :: RoundingMode -> RoundingMode -> RoundingMode # min :: RoundingMode -> RoundingMode -> RoundingMode # | |||||
| type Rep RoundingMode Source # | |||||
Defined in Numeric.Rounded.Hardware.Internal.Rounding type Rep RoundingMode = D1 ('MetaData "RoundingMode" "Numeric.Rounded.Hardware.Internal.Rounding" "rounded-hw-0.4.0.2-8N1qAeGOePG57F1jKA4niW" 'False) ((C1 ('MetaCons "ToNearest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TowardNegInf" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TowardInf" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TowardZero" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
class Rounding (r :: RoundingMode) Source #
This class allows you to recover the runtime value from a type-level rounding mode.
See rounding.
Minimal complete definition
roundingT
Instances
| Rounding 'ToNearest Source # | |
Defined in Numeric.Rounded.Hardware.Internal.Rounding Methods | |
| Rounding 'TowardInf Source # | |
Defined in Numeric.Rounded.Hardware.Internal.Rounding Methods | |
| Rounding 'TowardNegInf Source # | |
Defined in Numeric.Rounded.Hardware.Internal.Rounding Methods | |
| Rounding 'TowardZero Source # | |
Defined in Numeric.Rounded.Hardware.Internal.Rounding Methods | |
class Ord a => RoundedRing a Source #
Rounding-controlled version of Num.
Minimal complete definition
roundedAdd, roundedSub, roundedMul, roundedFusedMultiplyAdd, backendNameT
Instances
| RoundedRing CDouble Source # | |
Defined in Numeric.Rounded.Hardware.Backend.C Methods roundedAdd :: RoundingMode -> CDouble -> CDouble -> CDouble Source # roundedSub :: RoundingMode -> CDouble -> CDouble -> CDouble Source # roundedMul :: RoundingMode -> CDouble -> CDouble -> CDouble Source # roundedFusedMultiplyAdd :: RoundingMode -> CDouble -> CDouble -> CDouble -> CDouble Source # roundedFromInteger :: RoundingMode -> Integer -> CDouble Source # intervalAdd :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalSub :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalMul :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalMulAdd :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalFromInteger :: Integer -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # | |
| RoundedRing CFloat Source # | |
Defined in Numeric.Rounded.Hardware.Backend.C Methods roundedAdd :: RoundingMode -> CFloat -> CFloat -> CFloat Source # roundedSub :: RoundingMode -> CFloat -> CFloat -> CFloat Source # roundedMul :: RoundingMode -> CFloat -> CFloat -> CFloat Source # roundedFusedMultiplyAdd :: RoundingMode -> CFloat -> CFloat -> CFloat -> CFloat Source # roundedFromInteger :: RoundingMode -> Integer -> CFloat Source # intervalAdd :: Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> (Rounded 'TowardNegInf CFloat, Rounded 'TowardInf CFloat) Source # intervalSub :: Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> (Rounded 'TowardNegInf CFloat, Rounded 'TowardInf CFloat) Source # intervalMul :: Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> (Rounded 'TowardNegInf CFloat, Rounded 'TowardInf CFloat) Source # intervalMulAdd :: Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> (Rounded 'TowardNegInf CFloat, Rounded 'TowardInf CFloat) Source # intervalFromInteger :: Integer -> (Rounded 'TowardNegInf CFloat, Rounded 'TowardInf CFloat) Source # | |
| RoundedRing CDouble Source # | |
Defined in Numeric.Rounded.Hardware.Backend.FastFFI Methods roundedAdd :: RoundingMode -> CDouble -> CDouble -> CDouble Source # roundedSub :: RoundingMode -> CDouble -> CDouble -> CDouble Source # roundedMul :: RoundingMode -> CDouble -> CDouble -> CDouble Source # roundedFusedMultiplyAdd :: RoundingMode -> CDouble -> CDouble -> CDouble -> CDouble Source # roundedFromInteger :: RoundingMode -> Integer -> CDouble Source # intervalAdd :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalSub :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalMul :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalMulAdd :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalFromInteger :: Integer -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # | |
| RoundedRing Integer Source # | |
Defined in Numeric.Rounded.Hardware.Internal.Class Methods roundedAdd :: RoundingMode -> Integer -> Integer -> Integer Source # roundedSub :: RoundingMode -> Integer -> Integer -> Integer Source # roundedMul :: RoundingMode -> Integer -> Integer -> Integer Source # roundedFusedMultiplyAdd :: RoundingMode -> Integer -> Integer -> Integer -> Integer Source # roundedFromInteger :: RoundingMode -> Integer -> Integer Source # intervalAdd :: Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> (Rounded 'TowardNegInf Integer, Rounded 'TowardInf Integer) Source # intervalSub :: Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> (Rounded 'TowardNegInf Integer, Rounded 'TowardInf Integer) Source # intervalMul :: Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> (Rounded 'TowardNegInf Integer, Rounded 'TowardInf Integer) Source # intervalMulAdd :: Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> (Rounded 'TowardNegInf Integer, Rounded 'TowardInf Integer) Source # intervalFromInteger :: Integer -> (Rounded 'TowardNegInf Integer, Rounded 'TowardInf Integer) Source # | |
| RoundedRing Double Source # | |
Defined in Numeric.Rounded.Hardware.Backend.Default Methods roundedAdd :: RoundingMode -> Double -> Double -> Double Source # roundedSub :: RoundingMode -> Double -> Double -> Double Source # roundedMul :: RoundingMode -> Double -> Double -> Double Source # roundedFusedMultiplyAdd :: RoundingMode -> Double -> Double -> Double -> Double Source # roundedFromInteger :: RoundingMode -> Integer -> Double Source # intervalAdd :: Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> (Rounded 'TowardNegInf Double, Rounded 'TowardInf Double) Source # intervalSub :: Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> (Rounded 'TowardNegInf Double, Rounded 'TowardInf Double) Source # intervalMul :: Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> (Rounded 'TowardNegInf Double, Rounded 'TowardInf Double) Source # intervalMulAdd :: Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> (Rounded 'TowardNegInf Double, Rounded 'TowardInf Double) Source # intervalFromInteger :: Integer -> (Rounded 'TowardNegInf Double, Rounded 'TowardInf Double) Source # | |
| RoundedRing Float Source # | |
Defined in Numeric.Rounded.Hardware.Backend.Default Methods roundedAdd :: RoundingMode -> Float -> Float -> Float Source # roundedSub :: RoundingMode -> Float -> Float -> Float Source # roundedMul :: RoundingMode -> Float -> Float -> Float Source # roundedFusedMultiplyAdd :: RoundingMode -> Float -> Float -> Float -> Float Source # roundedFromInteger :: RoundingMode -> Integer -> Float Source # intervalAdd :: Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> (Rounded 'TowardNegInf Float, Rounded 'TowardInf Float) Source # intervalSub :: Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> (Rounded 'TowardNegInf Float, Rounded 'TowardInf Float) Source # intervalMul :: Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> (Rounded 'TowardNegInf Float, Rounded 'TowardInf Float) Source # intervalMulAdd :: Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> (Rounded 'TowardNegInf Float, Rounded 'TowardInf Float) Source # intervalFromInteger :: Integer -> (Rounded 'TowardNegInf Float, Rounded 'TowardInf Float) Source # | |
| Integral a => RoundedRing (Ratio a) Source # | |
Defined in Numeric.Rounded.Hardware.Internal.Class Methods roundedAdd :: RoundingMode -> Ratio a -> Ratio a -> Ratio a Source # roundedSub :: RoundingMode -> Ratio a -> Ratio a -> Ratio a Source # roundedMul :: RoundingMode -> Ratio a -> Ratio a -> Ratio a Source # roundedFusedMultiplyAdd :: RoundingMode -> Ratio a -> Ratio a -> Ratio a -> Ratio a Source # roundedFromInteger :: RoundingMode -> Integer -> Ratio a Source # intervalAdd :: Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> (Rounded 'TowardNegInf (Ratio a), Rounded 'TowardInf (Ratio a)) Source # intervalSub :: Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> (Rounded 'TowardNegInf (Ratio a), Rounded 'TowardInf (Ratio a)) Source # intervalMul :: Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> (Rounded 'TowardNegInf (Ratio a), Rounded 'TowardInf (Ratio a)) Source # intervalMulAdd :: Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> (Rounded 'TowardNegInf (Ratio a), Rounded 'TowardInf (Ratio a)) Source # intervalFromInteger :: Integer -> (Rounded 'TowardNegInf (Ratio a), Rounded 'TowardInf (Ratio a)) Source # | |
| (RealFloat a, Num a, RealFloatConstants a) => RoundedRing (ViaRational a) Source # | |
Defined in Numeric.Rounded.Hardware.Backend.ViaRational Methods roundedAdd :: RoundingMode -> ViaRational a -> ViaRational a -> ViaRational a Source # roundedSub :: RoundingMode -> ViaRational a -> ViaRational a -> ViaRational a Source # roundedMul :: RoundingMode -> ViaRational a -> ViaRational a -> ViaRational a Source # roundedFusedMultiplyAdd :: RoundingMode -> ViaRational a -> ViaRational a -> ViaRational a -> ViaRational a Source # roundedFromInteger :: RoundingMode -> Integer -> ViaRational a Source # intervalAdd :: Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> (Rounded 'TowardNegInf (ViaRational a), Rounded 'TowardInf (ViaRational a)) Source # intervalSub :: Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> (Rounded 'TowardNegInf (ViaRational a), Rounded 'TowardInf (ViaRational a)) Source # intervalMul :: Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> (Rounded 'TowardNegInf (ViaRational a), Rounded 'TowardInf (ViaRational a)) Source # intervalMulAdd :: Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> (Rounded 'TowardNegInf (ViaRational a), Rounded 'TowardInf (ViaRational a)) Source # intervalFromInteger :: Integer -> (Rounded 'TowardNegInf (ViaRational a), Rounded 'TowardInf (ViaRational a)) Source # backendNameT :: Tagged (ViaRational a) String Source # | |
class RoundedRing a => RoundedFractional a Source #
Rounding-controlled version of Fractional.
Minimal complete definition
Instances
| RoundedFractional CDouble Source # | |
Defined in Numeric.Rounded.Hardware.Backend.C Methods roundedDiv :: RoundingMode -> CDouble -> CDouble -> CDouble Source # roundedRecip :: RoundingMode -> CDouble -> CDouble Source # roundedFromRational :: RoundingMode -> Rational -> CDouble Source # roundedFromRealFloat :: RealFloat b => RoundingMode -> b -> CDouble Source # intervalDiv :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalDivAdd :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalRecip :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalFromRational :: Rational -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # | |
| RoundedFractional CFloat Source # | |
Defined in Numeric.Rounded.Hardware.Backend.C Methods roundedDiv :: RoundingMode -> CFloat -> CFloat -> CFloat Source # roundedRecip :: RoundingMode -> CFloat -> CFloat Source # roundedFromRational :: RoundingMode -> Rational -> CFloat Source # roundedFromRealFloat :: RealFloat b => RoundingMode -> b -> CFloat Source # intervalDiv :: Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> (Rounded 'TowardNegInf CFloat, Rounded 'TowardInf CFloat) Source # intervalDivAdd :: Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> (Rounded 'TowardNegInf CFloat, Rounded 'TowardInf CFloat) Source # intervalRecip :: Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> (Rounded 'TowardNegInf CFloat, Rounded 'TowardInf CFloat) Source # intervalFromRational :: Rational -> (Rounded 'TowardNegInf CFloat, Rounded 'TowardInf CFloat) Source # | |
| RoundedFractional CDouble Source # | |
Defined in Numeric.Rounded.Hardware.Backend.FastFFI Methods roundedDiv :: RoundingMode -> CDouble -> CDouble -> CDouble Source # roundedRecip :: RoundingMode -> CDouble -> CDouble Source # roundedFromRational :: RoundingMode -> Rational -> CDouble Source # roundedFromRealFloat :: RealFloat b => RoundingMode -> b -> CDouble Source # intervalDiv :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalDivAdd :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalRecip :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # intervalFromRational :: Rational -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # | |
| RoundedFractional Integer Source # | |
Defined in Numeric.Rounded.Hardware.Internal.Class Methods roundedDiv :: RoundingMode -> Integer -> Integer -> Integer Source # roundedRecip :: RoundingMode -> Integer -> Integer Source # roundedFromRational :: RoundingMode -> Rational -> Integer Source # roundedFromRealFloat :: RealFloat b => RoundingMode -> b -> Integer Source # intervalDiv :: Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> (Rounded 'TowardNegInf Integer, Rounded 'TowardInf Integer) Source # intervalDivAdd :: Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> (Rounded 'TowardNegInf Integer, Rounded 'TowardInf Integer) Source # intervalRecip :: Rounded 'TowardNegInf Integer -> Rounded 'TowardInf Integer -> (Rounded 'TowardNegInf Integer, Rounded 'TowardInf Integer) Source # intervalFromRational :: Rational -> (Rounded 'TowardNegInf Integer, Rounded 'TowardInf Integer) Source # | |
| RoundedFractional Double Source # | |
Defined in Numeric.Rounded.Hardware.Backend.Default Methods roundedDiv :: RoundingMode -> Double -> Double -> Double Source # roundedRecip :: RoundingMode -> Double -> Double Source # roundedFromRational :: RoundingMode -> Rational -> Double Source # roundedFromRealFloat :: RealFloat b => RoundingMode -> b -> Double Source # intervalDiv :: Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> (Rounded 'TowardNegInf Double, Rounded 'TowardInf Double) Source # intervalDivAdd :: Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> (Rounded 'TowardNegInf Double, Rounded 'TowardInf Double) Source # intervalRecip :: Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> (Rounded 'TowardNegInf Double, Rounded 'TowardInf Double) Source # intervalFromRational :: Rational -> (Rounded 'TowardNegInf Double, Rounded 'TowardInf Double) Source # | |
| RoundedFractional Float Source # | |
Defined in Numeric.Rounded.Hardware.Backend.Default Methods roundedDiv :: RoundingMode -> Float -> Float -> Float Source # roundedRecip :: RoundingMode -> Float -> Float Source # roundedFromRational :: RoundingMode -> Rational -> Float Source # roundedFromRealFloat :: RealFloat b => RoundingMode -> b -> Float Source # intervalDiv :: Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> (Rounded 'TowardNegInf Float, Rounded 'TowardInf Float) Source # intervalDivAdd :: Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> (Rounded 'TowardNegInf Float, Rounded 'TowardInf Float) Source # intervalRecip :: Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> (Rounded 'TowardNegInf Float, Rounded 'TowardInf Float) Source # intervalFromRational :: Rational -> (Rounded 'TowardNegInf Float, Rounded 'TowardInf Float) Source # | |
| Integral a => RoundedFractional (Ratio a) Source # | |
Defined in Numeric.Rounded.Hardware.Internal.Class Methods roundedDiv :: RoundingMode -> Ratio a -> Ratio a -> Ratio a Source # roundedRecip :: RoundingMode -> Ratio a -> Ratio a Source # roundedFromRational :: RoundingMode -> Rational -> Ratio a Source # roundedFromRealFloat :: RealFloat b => RoundingMode -> b -> Ratio a Source # intervalDiv :: Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> (Rounded 'TowardNegInf (Ratio a), Rounded 'TowardInf (Ratio a)) Source # intervalDivAdd :: Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> (Rounded 'TowardNegInf (Ratio a), Rounded 'TowardInf (Ratio a)) Source # intervalRecip :: Rounded 'TowardNegInf (Ratio a) -> Rounded 'TowardInf (Ratio a) -> (Rounded 'TowardNegInf (Ratio a), Rounded 'TowardInf (Ratio a)) Source # intervalFromRational :: Rational -> (Rounded 'TowardNegInf (Ratio a), Rounded 'TowardInf (Ratio a)) Source # | |
| (RealFloat a, Num a, RealFloatConstants a) => RoundedFractional (ViaRational a) Source # | |
Defined in Numeric.Rounded.Hardware.Backend.ViaRational Methods roundedDiv :: RoundingMode -> ViaRational a -> ViaRational a -> ViaRational a Source # roundedRecip :: RoundingMode -> ViaRational a -> ViaRational a Source # roundedFromRational :: RoundingMode -> Rational -> ViaRational a Source # roundedFromRealFloat :: RealFloat b => RoundingMode -> b -> ViaRational a Source # intervalDiv :: Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> (Rounded 'TowardNegInf (ViaRational a), Rounded 'TowardInf (ViaRational a)) Source # intervalDivAdd :: Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> (Rounded 'TowardNegInf (ViaRational a), Rounded 'TowardInf (ViaRational a)) Source # intervalRecip :: Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> (Rounded 'TowardNegInf (ViaRational a), Rounded 'TowardInf (ViaRational a)) Source # intervalFromRational :: Rational -> (Rounded 'TowardNegInf (ViaRational a), Rounded 'TowardInf (ViaRational a)) Source # | |
class RoundedRing a => RoundedSqrt a Source #
Rounding-controlled version of sqrt.
Minimal complete definition
Instances
| RoundedSqrt CDouble Source # | |
Defined in Numeric.Rounded.Hardware.Backend.C Methods roundedSqrt :: RoundingMode -> CDouble -> CDouble Source # intervalSqrt :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # | |
| RoundedSqrt CFloat Source # | |
Defined in Numeric.Rounded.Hardware.Backend.C Methods roundedSqrt :: RoundingMode -> CFloat -> CFloat Source # intervalSqrt :: Rounded 'TowardNegInf CFloat -> Rounded 'TowardInf CFloat -> (Rounded 'TowardNegInf CFloat, Rounded 'TowardInf CFloat) Source # | |
| RoundedSqrt CDouble Source # | |
Defined in Numeric.Rounded.Hardware.Backend.FastFFI Methods roundedSqrt :: RoundingMode -> CDouble -> CDouble Source # intervalSqrt :: Rounded 'TowardNegInf CDouble -> Rounded 'TowardInf CDouble -> (Rounded 'TowardNegInf CDouble, Rounded 'TowardInf CDouble) Source # | |
| RoundedSqrt Double Source # | |
Defined in Numeric.Rounded.Hardware.Backend.Default Methods roundedSqrt :: RoundingMode -> Double -> Double Source # intervalSqrt :: Rounded 'TowardNegInf Double -> Rounded 'TowardInf Double -> (Rounded 'TowardNegInf Double, Rounded 'TowardInf Double) Source # | |
| RoundedSqrt Float Source # | |
Defined in Numeric.Rounded.Hardware.Backend.Default Methods roundedSqrt :: RoundingMode -> Float -> Float Source # intervalSqrt :: Rounded 'TowardNegInf Float -> Rounded 'TowardInf Float -> (Rounded 'TowardNegInf Float, Rounded 'TowardInf Float) Source # | |
| (RealFloat a, RealFloatConstants a) => RoundedSqrt (ViaRational a) Source # | |
Defined in Numeric.Rounded.Hardware.Backend.ViaRational Methods roundedSqrt :: RoundingMode -> ViaRational a -> ViaRational a Source # intervalSqrt :: Rounded 'TowardNegInf (ViaRational a) -> Rounded 'TowardInf (ViaRational a) -> (Rounded 'TowardNegInf (ViaRational a), Rounded 'TowardInf (ViaRational a)) Source # | |