Algebra.Instances
Contents
Description
This Library provides some *dangerous* instances for Doubles and Complex.
Double
Complex
Methods
fromInteger :: Integer -> Double
fromNatural :: Natural -> Double #
isZero :: Double -> Bool #
one :: Double #
pow :: Double -> Natural -> Double #
productWith :: Foldable f => (a -> Double) -> f a -> Double #
recip :: Double -> Double #
(/) :: Double -> Double -> Double #
(\\) :: Double -> Double -> Double #
(^) :: Integral n => Double -> n -> Double
(*) :: Double -> Double -> Double #
pow1p :: Double -> Natural -> Double #
productWith1 :: Foldable1 f => (a -> Double) -> f a -> Double #
zero :: Double #
sinnum :: Natural -> Double -> Double #
sumWith :: Foldable f => (a -> Double) -> f a -> Double #
(-) :: Double -> Double -> Double #
negate :: Double -> Double #
subtract :: Double -> Double -> Double #
times :: Integral n => n -> Double -> Double #
(+) :: Double -> Double -> Double #
sinnum1p :: Natural -> Double -> Double #
sumWith1 :: Foldable1 f => (a -> Double) -> f a -> Double #
(*.) :: Double -> Integer -> Double #
(*.) :: Double -> Natural -> Double #
(.*) :: Integer -> Double -> Double #
(.*) :: Natural -> Double -> Double #
(*.) :: Ratio r -> Integer -> Ratio r #
(*.) :: Ratio r -> Natural -> Ratio r #
(*.) :: Complex r -> a -> Complex r #
(.*) :: Integer -> Ratio r -> Ratio r #
(.*) :: Natural -> Ratio r -> Ratio r #
(.*) :: a -> Complex r -> Complex r #
fromInteger :: Integer -> Ratio r
fromInteger :: Integer -> Complex r
fromNatural :: Natural -> Ratio r #
fromNatural :: Natural -> Complex r #
isZero :: Ratio r -> Bool #
These Instances are not algebraically right, but for the sake of convenience.
isZero :: Complex r -> Bool #
recipUnit :: Ratio r -> Maybe (Ratio r) #
isUnit :: Ratio r -> Bool #
(^?) :: Integral n => Ratio r -> n -> Maybe (Ratio r) #
one :: Ratio r #
pow :: Ratio r -> Natural -> Ratio r #
productWith :: Foldable f => (a -> Ratio r) -> f a -> Ratio r #
one :: Complex r #
pow :: Complex r -> Natural -> Complex r #
productWith :: Foldable f => (a -> Complex r) -> f a -> Complex r #
recip :: Ratio r -> Ratio r #
(/) :: Ratio r -> Ratio r -> Ratio r #
(\\) :: Ratio r -> Ratio r -> Ratio r #
(^) :: Integral n => Ratio r -> n -> Ratio r
(*) :: Ratio r -> Ratio r -> Ratio r #
pow1p :: Ratio r -> Natural -> Ratio r #
productWith1 :: Foldable1 f => (a -> Ratio r) -> f a -> Ratio r #
(*) :: Complex r -> Complex r -> Complex r #
pow1p :: Complex r -> Natural -> Complex r #
productWith1 :: Foldable1 f => (a -> Complex r) -> f a -> Complex r #
zero :: Ratio r #
sinnum :: Natural -> Ratio r -> Ratio r #
sumWith :: Foldable f => (a -> Ratio r) -> f a -> Ratio r #
zero :: Complex r #
sinnum :: Natural -> Complex r -> Complex r #
sumWith :: Foldable f => (a -> Complex r) -> f a -> Complex r #
(-) :: Ratio r -> Ratio r -> Ratio r #
negate :: Ratio r -> Ratio r #
subtract :: Ratio r -> Ratio r -> Ratio r #
times :: Integral n => n -> Ratio r -> Ratio r #
(-) :: Complex r -> Complex r -> Complex r #
negate :: Complex r -> Complex r #
subtract :: Complex r -> Complex r -> Complex r #
times :: Integral n => n -> Complex r -> Complex r #
(+) :: Ratio r -> Ratio r -> Ratio r #
sinnum1p :: Natural -> Ratio r -> Ratio r #
sumWith1 :: Foldable1 f => (a -> Ratio r) -> f a -> Ratio r #
(+) :: Vector r -> Vector r -> Vector r #
sinnum1p :: Natural -> Vector r -> Vector r #
sumWith1 :: Foldable1 f => (a -> Vector r) -> f a -> Vector r #
(+) :: Complex r -> Complex r -> Complex r #
sinnum1p :: Natural -> Complex r -> Complex r #
sumWith1 :: Foldable1 f => (a -> Complex r) -> f a -> Complex r #
rnf :: Fraction a -> () #
randomR :: RandomGen g => (Fraction Integer, Fraction Integer) -> g -> (Fraction Integer, g)
random :: RandomGen g => g -> (Fraction Integer, g)
randomRs :: RandomGen g => (Fraction Integer, Fraction Integer) -> g -> [Fraction Integer]
randoms :: RandomGen g => g -> [Fraction Integer]
safeConvert :: Fraction Integer -> ConvertResult Double
(*.) :: Ratio r -> Scalar r -> Ratio r #
(.*) :: Scalar r -> Ratio r -> Ratio r #
safeConvert :: Fraction Integer -> ConvertResult (Complex Double)