what4-1.0: Solver-agnostic symbolic values support for issuing queries

What4.Utils.Complex

Description

This module provides complex numbers without the RealFloat constraints that Data.Complex has. This is useful for representing various intermediate symbolic representations of complex numbers that are not literally number representations.

Synopsis

Documentation

data Complex a Source #

A complex pair over an arbitrary type.

Constructors

 !a :+ !a infix 6
Instances
 Source # Instance detailsDefined in What4.Utils.Complex Methodsfmap :: (a -> b) -> Complex a -> Complex b #(<\$) :: a -> Complex b -> Complex a # Source # Instance detailsDefined in What4.Utils.Complex Methodsfold :: Monoid m => Complex m -> m #foldMap :: Monoid m => (a -> m) -> Complex a -> m #foldr :: (a -> b -> b) -> b -> Complex a -> b #foldr' :: (a -> b -> b) -> b -> Complex a -> b #foldl :: (b -> a -> b) -> b -> Complex a -> b #foldl' :: (b -> a -> b) -> b -> Complex a -> b #foldr1 :: (a -> a -> a) -> Complex a -> a #foldl1 :: (a -> a -> a) -> Complex a -> a #toList :: Complex a -> [a] #null :: Complex a -> Bool #length :: Complex a -> Int #elem :: Eq a => a -> Complex a -> Bool #maximum :: Ord a => Complex a -> a #minimum :: Ord a => Complex a -> a #sum :: Num a => Complex a -> a #product :: Num a => Complex a -> a # Source # Instance detailsDefined in What4.Utils.Complex Methodstraverse :: Applicative f => (a -> f b) -> Complex a -> f (Complex b) #sequenceA :: Applicative f => Complex (f a) -> f (Complex a) #mapM :: Monad m => (a -> m b) -> Complex a -> m (Complex b) #sequence :: Monad m => Complex (m a) -> m (Complex a) # Eq a => Eq (Complex a) Source # Instance detailsDefined in What4.Utils.Complex Methods(==) :: Complex a -> Complex a -> Bool #(/=) :: Complex a -> Complex a -> Bool # RealFloat a => Floating (Complex a) Source # Instance detailsDefined in What4.Utils.Complex Methodspi :: Complex a #exp :: Complex a -> Complex a #log :: Complex a -> Complex a #sqrt :: Complex a -> Complex a #(**) :: Complex a -> Complex a -> Complex a #logBase :: Complex a -> Complex a -> Complex a #sin :: Complex a -> Complex a #cos :: Complex a -> Complex a #tan :: Complex a -> Complex a #asin :: Complex a -> Complex a #acos :: Complex a -> Complex a #atan :: Complex a -> Complex a #sinh :: Complex a -> Complex a #cosh :: Complex a -> Complex a #tanh :: Complex a -> Complex a #asinh :: Complex a -> Complex a #acosh :: Complex a -> Complex a #atanh :: Complex a -> Complex a #log1p :: Complex a -> Complex a #expm1 :: Complex a -> Complex a #log1pexp :: Complex a -> Complex a #log1mexp :: Complex a -> Complex a # Floating a => Fractional (Complex a) Source # Instance detailsDefined in What4.Utils.Complex Methods(/) :: Complex a -> Complex a -> Complex a #recip :: Complex a -> Complex a # Floating a => Num (Complex a) Source # Instance detailsDefined in What4.Utils.Complex Methods(+) :: Complex a -> Complex a -> Complex a #(-) :: Complex a -> Complex a -> Complex a #(*) :: Complex a -> Complex a -> Complex a #negate :: Complex a -> Complex a #abs :: Complex a -> Complex a #signum :: Complex a -> Complex a # Ord a => Ord (Complex a) Source # Instance detailsDefined in What4.Utils.Complex Methodscompare :: Complex a -> Complex a -> Ordering #(<) :: Complex a -> Complex a -> Bool #(<=) :: Complex a -> Complex a -> Bool #(>) :: Complex a -> Complex a -> Bool #(>=) :: Complex a -> Complex a -> Bool #max :: Complex a -> Complex a -> Complex a #min :: Complex a -> Complex a -> Complex a # (Ord a, Floating a) => Real (Complex a) Source # Instance detailsDefined in What4.Utils.Complex Methods (Ord a, Floating a) => RealFrac (Complex a) Source # Instance detailsDefined in What4.Utils.Complex MethodsproperFraction :: Integral b => Complex a -> (b, Complex a) #truncate :: Integral b => Complex a -> b #round :: Integral b => Complex a -> b #ceiling :: Integral b => Complex a -> b #floor :: Integral b => Complex a -> b # (Eq a, Num a, Show a) => Show (Complex a) Source # Instance detailsDefined in What4.Utils.Complex MethodsshowsPrec :: Int -> Complex a -> ShowS #show :: Complex a -> String #showList :: [Complex a] -> ShowS # Source # Instance detailsDefined in What4.Utils.Complex Associated Typestype Rep (Complex a) :: Type -> Type # Methodsfrom :: Complex a -> Rep (Complex a) x #to :: Rep (Complex a) x -> Complex a # Hashable a => Hashable (Complex a) Source # Instance detailsDefined in What4.Utils.Complex MethodshashWithSalt :: Int -> Complex a -> Int #hash :: Complex a -> Int # PolyEq x y => PolyEq (Complex x) (Complex y) Source # Instance detailsDefined in What4.Utils.Complex MethodspolyEqF :: Complex x -> Complex y -> Maybe (Complex x :~: Complex y) #polyEq :: Complex x -> Complex y -> Bool # type Rep (Complex a) Source # Instance detailsDefined in What4.Utils.Complex type Rep (Complex a) = D1 (MetaData "Complex" "What4.Utils.Complex" "what4-1.0-IcCGmY3T3YeXUBLCM24Pe" False) (C1 (MetaCons ":+" (InfixI NotAssociative 6) False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a)))

magnitudeSq :: Num a => Complex a -> a Source #

Returns square of magnitude.

Arguments

 :: (Ord a, Fractional a, Monad m) => (a -> m a) Square-root function defined for non-negative values a. -> Complex a -> m (Complex a)

Arguments

 :: Num a => (a -> b) Sqrt function -> Complex a -> b