numbers-3000.2.0.2: Various number types
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Number.Symbolic

Description

Symbolic number, i.e., these are not numbers at all, but just build a representation of the expressions. This implementation is incomplete in that it allows comnstruction, but not deconstruction of the expressions. It's mainly useful for debugging.

Synopsis

Documentation

data Sym a Source #

Symbolic numbers over some base type for the literals.

Instances

Instances details
Enum a => Enum (Sym a) Source # 
Instance details

Defined in Data.Number.Symbolic

Methods

succ :: Sym a -> Sym a Source #

pred :: Sym a -> Sym a Source #

toEnum :: Int -> Sym a Source #

fromEnum :: Sym a -> Int Source #

enumFrom :: Sym a -> [Sym a] Source #

enumFromThen :: Sym a -> Sym a -> [Sym a] Source #

enumFromTo :: Sym a -> Sym a -> [Sym a] Source #

enumFromThenTo :: Sym a -> Sym a -> Sym a -> [Sym a] Source #

(Floating a, Eq a) => Floating (Sym a) Source # 
Instance details

Defined in Data.Number.Symbolic

Methods

pi :: Sym a Source #

exp :: Sym a -> Sym a Source #

log :: Sym a -> Sym a Source #

sqrt :: Sym a -> Sym a Source #

(**) :: Sym a -> Sym a -> Sym a Source #

logBase :: Sym a -> Sym a -> Sym a Source #

sin :: Sym a -> Sym a Source #

cos :: Sym a -> Sym a Source #

tan :: Sym a -> Sym a Source #

asin :: Sym a -> Sym a Source #

acos :: Sym a -> Sym a Source #

atan :: Sym a -> Sym a Source #

sinh :: Sym a -> Sym a Source #

cosh :: Sym a -> Sym a Source #

tanh :: Sym a -> Sym a Source #

asinh :: Sym a -> Sym a Source #

acosh :: Sym a -> Sym a Source #

atanh :: Sym a -> Sym a Source #

log1p :: Sym a -> Sym a Source #

expm1 :: Sym a -> Sym a Source #

log1pexp :: Sym a -> Sym a Source #

log1mexp :: Sym a -> Sym a Source #

(RealFloat a, Show a) => RealFloat (Sym a) Source # 
Instance details

Defined in Data.Number.Symbolic

(Num a, Eq a) => Num (Sym a) Source # 
Instance details

Defined in Data.Number.Symbolic

Methods

(+) :: Sym a -> Sym a -> Sym a Source #

(-) :: Sym a -> Sym a -> Sym a Source #

(*) :: Sym a -> Sym a -> Sym a Source #

negate :: Sym a -> Sym a Source #

abs :: Sym a -> Sym a Source #

signum :: Sym a -> Sym a Source #

fromInteger :: Integer -> Sym a Source #

(Fractional a, Eq a) => Fractional (Sym a) Source # 
Instance details

Defined in Data.Number.Symbolic

Methods

(/) :: Sym a -> Sym a -> Sym a Source #

recip :: Sym a -> Sym a Source #

fromRational :: Rational -> Sym a Source #

Integral a => Integral (Sym a) Source # 
Instance details

Defined in Data.Number.Symbolic

Methods

quot :: Sym a -> Sym a -> Sym a Source #

rem :: Sym a -> Sym a -> Sym a Source #

div :: Sym a -> Sym a -> Sym a Source #

mod :: Sym a -> Sym a -> Sym a Source #

quotRem :: Sym a -> Sym a -> (Sym a, Sym a) Source #

divMod :: Sym a -> Sym a -> (Sym a, Sym a) Source #

toInteger :: Sym a -> Integer Source #

Real a => Real (Sym a) Source # 
Instance details

Defined in Data.Number.Symbolic

Methods

toRational :: Sym a -> Rational Source #

RealFrac a => RealFrac (Sym a) Source # 
Instance details

Defined in Data.Number.Symbolic

Methods

properFraction :: Integral b => Sym a -> (b, Sym a) Source #

truncate :: Integral b => Sym a -> b Source #

round :: Integral b => Sym a -> b Source #

ceiling :: Integral b => Sym a -> b Source #

floor :: Integral b => Sym a -> b Source #

Show a => Show (Sym a) Source # 
Instance details

Defined in Data.Number.Symbolic

Methods

showsPrec :: Int -> Sym a -> ShowS Source #

show :: Sym a -> String Source #

showList :: [Sym a] -> ShowS Source #

Eq a => Eq (Sym a) Source # 
Instance details

Defined in Data.Number.Symbolic

Methods

(==) :: Sym a -> Sym a -> Bool Source #

(/=) :: Sym a -> Sym a -> Bool Source #

Ord a => Ord (Sym a) Source # 
Instance details

Defined in Data.Number.Symbolic

Methods

compare :: Sym a -> Sym a -> Ordering Source #

(<) :: Sym a -> Sym a -> Bool Source #

(<=) :: Sym a -> Sym a -> Bool Source #

(>) :: Sym a -> Sym a -> Bool Source #

(>=) :: Sym a -> Sym a -> Bool Source #

max :: Sym a -> Sym a -> Sym a Source #

min :: Sym a -> Sym a -> Sym a Source #

var :: String -> Sym a Source #

Create a variable.

con :: a -> Sym a Source #

Create a constant (useful when it is not a literal).

subst :: (Num a, Eq a) => String -> Sym a -> Sym a -> Sym a Source #

The expression subst x v e substitutes the expression v for each occurence of the variable x in e.

unSym :: Show a => Sym a -> a Source #