ContentsIndex
Org.Org.Semantic.HBase.Mathematics.IntegerDivide
Synopsis
data IntRoundingMode
= IntRoundFloor
| IntRoundCeiling
| IntRoundTowardZero
| IntRoundAwayFromZero
data RoundingMode
= RoundInt IntRoundingMode
| RoundClosest IntRoundingMode
| RoundClosestHalfEven
roundFloor :: RoundingMode
roundCeiling :: RoundingMode
roundTowardZero :: RoundingMode
roundAwayFromZero :: RoundingMode
roundHalfFloor :: RoundingMode
roundHalfCeiling :: RoundingMode
roundHalfTowardZero :: RoundingMode
roundHalfAwayFromZero :: RoundingMode
roundHalfEven :: RoundingMode
adjustRoundingPair :: (HasZero i, HasOne i, MaybeOrdered i, Additive i i i, IsA Integer i, HasZero a, Eq a, MaybeOrdered a, HasAbsolute a a, Additive a a aa, Subtractive a a aa, IsA (NaNExtended a) aa, ?rounding :: RoundingMode) => a -> (i, a) -> (i, a)
class (HasZero i, HasOne i, MaybeOrdered i, Additive i i i, IsA Integer i, HasZero a, HasOne a, Eq a, MaybeOrdered a, HasAbsolute a a, Additive a a aa, Subtractive a a aa, IsA (NaNExtended a) aa) => MaybeHasIntegerDivide i aa a | a -> aa i where
maybeIntegerDivideModulo :: a -> a -> Maybe (i, a)
maybeIntegerDivideModuloModal :: ?rounding :: RoundingMode => a -> a -> Maybe (i, a)
maybeFloorFraction :: a -> Maybe (i, a)
maybeRoundFraction :: ?rounding :: RoundingMode => a -> Maybe (i, a)
maybeFloor :: a -> Maybe i
maybeRound :: ?rounding :: RoundingMode => a -> Maybe i
maybeCeiling :: MaybeHasIntegerDivide i aa a => a -> Maybe i
maybeIntegerDivide :: MaybeHasIntegerDivide i aa a => a -> a -> Maybe i
maybeIntegerDivideModal :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> a -> Maybe i
maybeModulo :: MaybeHasIntegerDivide i aa a => a -> a -> Maybe a
maybeModuloModal :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> a -> Maybe a
isInteger :: (MaybeHasIntegerDivide i aa a, HasZero a) => a -> Bool
isDivisible :: (MaybeHasIntegerDivide i aa a, HasZero a) => a -> a -> Bool
isNotDivisible :: (MaybeHasIntegerDivide i aa a, HasZero a) => a -> a -> Bool
isEven :: (MaybeHasIntegerDivide i aa a, InterpretIntegerLiteral a) => a -> Bool
isOdd :: (MaybeHasIntegerDivide i aa a, InterpretIntegerLiteral a) => a -> Bool
failingIntegerDivideModulo :: MaybeHasIntegerDivide i aa a => a -> a -> (i, a)
failingIntegerDivideModuloModal :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> a -> (i, a)
failingFloorFraction :: MaybeHasIntegerDivide i aa a => a -> (i, a)
failingFloor :: MaybeHasIntegerDivide i aa a => a -> i
failingRound :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> i
failingCeiling :: MaybeHasIntegerDivide i aa a => a -> i
failingIntegerDivide :: MaybeHasIntegerDivide i aa a => a -> a -> i
failingIntegerDivideModal :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> a -> i
failingModulo :: MaybeHasIntegerDivide i aa a => a -> a -> a
failingModuloModal :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> a -> a
floor :: MaybeHasIntegerDivide i aa a => a -> i
round :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> i
ceiling :: MaybeHasIntegerDivide i aa a => a -> i
properFraction :: MaybeHasIntegerDivide i aa a => a -> (i, a)
divMod :: MaybeHasIntegerDivide i aa a => a -> a -> (i, a)
div :: MaybeHasIntegerDivide i aa a => a -> a -> i
mod :: MaybeHasIntegerDivide i aa a => a -> a -> a
class MaybeHasIntegerDivide i a a => HasIntegerDivide i a | a -> i where
integerDivideModulo :: a -> a -> (i, a)
integerDivideModuloModal :: ?rounding :: RoundingMode => a -> a -> (i, a)
strictFloorFraction :: a -> (i, a)
strictRoundFraction :: ?rounding :: RoundingMode => a -> (i, a)
strictFloor :: a -> i
strictRound :: ?rounding :: RoundingMode => a -> i
strictCeiling :: HasIntegerDivide i a => a -> i
integerDivide :: HasIntegerDivide i a => a -> a -> i
integerDivideModal :: (HasIntegerDivide i a, ?rounding :: RoundingMode) => a -> a -> i
modulo :: HasIntegerDivide i a => a -> a -> a
moduloModal :: (HasIntegerDivide i a, ?rounding :: RoundingMode) => a -> a -> a
Documentation
data IntRoundingMode
Constructors
IntRoundFloor
IntRoundCeiling
IntRoundTowardZero
IntRoundAwayFromZero
Instances
Show IntRoundingMode
data RoundingMode
Constructors
RoundInt IntRoundingMode
RoundClosest IntRoundingMode
RoundClosestHalfEven
Instances
Show RoundingMode
roundFloor :: RoundingMode
roundCeiling :: RoundingMode
roundTowardZero :: RoundingMode
roundAwayFromZero :: RoundingMode
roundHalfFloor :: RoundingMode
roundHalfCeiling :: RoundingMode
roundHalfTowardZero :: RoundingMode
roundHalfAwayFromZero :: RoundingMode
roundHalfEven :: RoundingMode
adjustRoundingPair :: (HasZero i, HasOne i, MaybeOrdered i, Additive i i i, IsA Integer i, HasZero a, Eq a, MaybeOrdered a, HasAbsolute a a, Additive a a aa, Subtractive a a aa, IsA (NaNExtended a) aa, ?rounding :: RoundingMode) => a -> (i, a) -> (i, a)
class (HasZero i, HasOne i, MaybeOrdered i, Additive i i i, IsA Integer i, HasZero a, HasOne a, Eq a, MaybeOrdered a, HasAbsolute a a, Additive a a aa, Subtractive a a aa, IsA (NaNExtended a) aa) => MaybeHasIntegerDivide i aa a | a -> aa i where
a may be rounded to i
Methods
maybeIntegerDivideModulo :: a -> a -> Maybe (i, a)
floor
maybeIntegerDivideModuloModal :: ?rounding :: RoundingMode => a -> a -> Maybe (i, a)
maybeFloorFraction :: a -> Maybe (i, a)
maybeRoundFraction :: ?rounding :: RoundingMode => a -> Maybe (i, a)
maybeFloor :: a -> Maybe i
maybeRound :: ?rounding :: RoundingMode => a -> Maybe i
Instances
MaybeHasIntegerDivide Integer Double Double
MaybeHasIntegerDivide Integer EIReal EIReal
MaybeHasIntegerDivide i a a => MaybeHasIntegerDivide i (NaNExtended (InfExtended a)) (InfExtended a)
MaybeHasIntegerDivide Integer Integer Integer
MaybeHasIntegerDivide Int Int Int
MaybeHasIntegerDivide Word8 Word8 Word8
MaybeHasIntegerDivide Int8 Int8 Int8
MaybeHasIntegerDivide Word16 Word16 Word16
MaybeHasIntegerDivide Int16 Int16 Int16
MaybeHasIntegerDivide Word32 Word32 Word32
MaybeHasIntegerDivide Int32 Int32 Int32
MaybeHasIntegerDivide Word64 Word64 Word64
MaybeHasIntegerDivide Int64 Int64 Int64
MaybeHasIntegerDivide Integer Rational Rational
maybeCeiling :: MaybeHasIntegerDivide i aa a => a -> Maybe i
maybeIntegerDivide :: MaybeHasIntegerDivide i aa a => a -> a -> Maybe i
maybeIntegerDivideModal :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> a -> Maybe i
maybeModulo :: MaybeHasIntegerDivide i aa a => a -> a -> Maybe a
maybeModuloModal :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> a -> Maybe a
isInteger :: (MaybeHasIntegerDivide i aa a, HasZero a) => a -> Bool
isDivisible :: (MaybeHasIntegerDivide i aa a, HasZero a) => a -> a -> Bool
isNotDivisible :: (MaybeHasIntegerDivide i aa a, HasZero a) => a -> a -> Bool
isEven :: (MaybeHasIntegerDivide i aa a, InterpretIntegerLiteral a) => a -> Bool
isOdd :: (MaybeHasIntegerDivide i aa a, InterpretIntegerLiteral a) => a -> Bool
failingIntegerDivideModulo :: MaybeHasIntegerDivide i aa a => a -> a -> (i, a)
failingIntegerDivideModuloModal :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> a -> (i, a)
failingFloorFraction :: MaybeHasIntegerDivide i aa a => a -> (i, a)
failingFloor :: MaybeHasIntegerDivide i aa a => a -> i
failingRound :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> i
failingCeiling :: MaybeHasIntegerDivide i aa a => a -> i
failingIntegerDivide :: MaybeHasIntegerDivide i aa a => a -> a -> i
failingIntegerDivideModal :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> a -> i
failingModulo :: MaybeHasIntegerDivide i aa a => a -> a -> a
failingModuloModal :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> a -> a
floor :: MaybeHasIntegerDivide i aa a => a -> i
round :: (MaybeHasIntegerDivide i aa a, ?rounding :: RoundingMode) => a -> i
ceiling :: MaybeHasIntegerDivide i aa a => a -> i
properFraction :: MaybeHasIntegerDivide i aa a => a -> (i, a)
divMod :: MaybeHasIntegerDivide i aa a => a -> a -> (i, a)
div :: MaybeHasIntegerDivide i aa a => a -> a -> i
mod :: MaybeHasIntegerDivide i aa a => a -> a -> a
class MaybeHasIntegerDivide i a a => HasIntegerDivide i a | a -> i where
Methods
integerDivideModulo :: a -> a -> (i, a)
floor
integerDivideModuloModal :: ?rounding :: RoundingMode => a -> a -> (i, a)
strictFloorFraction :: a -> (i, a)
strictRoundFraction :: ?rounding :: RoundingMode => a -> (i, a)
strictFloor :: a -> i
strictRound :: ?rounding :: RoundingMode => a -> i
Instances
HasIntegerDivide Integer Integer
HasIntegerDivide Int Int
HasIntegerDivide Word8 Word8
HasIntegerDivide Int8 Int8
HasIntegerDivide Word16 Word16
HasIntegerDivide Int16 Int16
HasIntegerDivide Word32 Word32
HasIntegerDivide Int32 Int32
HasIntegerDivide Word64 Word64
HasIntegerDivide Int64 Int64
HasIntegerDivide Integer Rational
strictCeiling :: HasIntegerDivide i a => a -> i
integerDivide :: HasIntegerDivide i a => a -> a -> i
integerDivideModal :: (HasIntegerDivide i a, ?rounding :: RoundingMode) => a -> a -> i
modulo :: HasIntegerDivide i a => a -> a -> a
moduloModal :: (HasIntegerDivide i a, ?rounding :: RoundingMode) => a -> a -> a
Produced by Haddock version 0.6