incipit-base-0.2.0.0: A Prelude for Polysemy – Base Reexports
Safe HaskellSafe-Inferred
LanguageHaskell2010

Incipit.Integral

Synopsis

Documentation

safeOp :: Real a => (a -> a -> b) -> a -> a -> Maybe b Source #

quot :: Integral a => a -> a -> Maybe a Source #

integer division truncated toward zero

rem :: Integral a => a -> a -> Maybe a Source #

integer remainder, satisfying

(x `quot` y)*y + (x `rem` y) == x

div :: Integral a => a -> a -> Maybe a Source #

integer division truncated toward negative infinity

mod :: Integral a => a -> a -> Maybe a Source #

integer modulus, satisfying

(x `div` y)*y + (x `mod` y) == x

quotRem :: Integral a => a -> a -> Maybe (a, a) Source #

simultaneous quot and rem

divMod :: Integral a => a -> a -> Maybe (a, a) Source #

simultaneous div and mod