Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | Safe |
Language | Haskell2010 |
Domain.Math.Safe
Contents
Description
Safe division
class Num a => SafeDiv a where Source #
Minimal complete definition
Instances
SafeDiv Double Source # | |
SafeDiv Integer Source # | |
SafeDiv DecimalFraction Source # | |
Defined in Domain.Math.Data.DecimalFraction Methods safeDiv :: DecimalFraction -> DecimalFraction -> Maybe DecimalFraction Source # safeRecip :: DecimalFraction -> Maybe DecimalFraction Source # | |
Integral a => SafeDiv (Ratio a) Source # | |
(Eq a, Fractional a) => SafeDiv (SquareRoot a) Source # | |
Defined in Domain.Math.Data.SquareRoot Methods safeDiv :: SquareRoot a -> SquareRoot a -> Maybe (SquareRoot a) Source # safeRecip :: SquareRoot a -> Maybe (SquareRoot a) Source # | |
(Eq a, Fractional a) => SafeDiv (Polynomial a) Source # | |
Defined in Domain.Math.Data.Polynomial Methods safeDiv :: Polynomial a -> Polynomial a -> Maybe (Polynomial a) Source # safeRecip :: Polynomial a -> Maybe (Polynomial a) Source # |
safeDivFractional :: (Eq a, Fractional a) => a -> a -> Maybe a Source #
Safe power and root
class Num a => SafePower a where Source #
Instances
SafePower Double Source # | |
SafePower Integer Source # | |
SafePower DecimalFraction Source # | |
Defined in Domain.Math.Data.DecimalFraction Methods safePower :: DecimalFraction -> DecimalFraction -> Maybe DecimalFraction Source # safeSqrt :: DecimalFraction -> Maybe DecimalFraction Source # safeRoot :: DecimalFraction -> DecimalFraction -> Maybe DecimalFraction Source # | |
Integral a => SafePower (Ratio a) Source # | |