numeric-prelude-0.4.4: An experimental alternative hierarchy of numeric type classes
Safe HaskellNone
LanguageHaskell98

MathObj.PowerSeries

Description

Power series, either finite or unbounded. (zipWith does exactly the right thing to make it work almost transparently.)

Synopsis

Documentation

>>> import qualified MathObj.PowerSeries.Core as PS
>>> import qualified MathObj.PowerSeries as PST
>>> import qualified Test.QuickCheck as QC
>>> import Test.NumericPrelude.Utility (equalTrunc, (/\))
>>> import NumericPrelude.Numeric as NP
>>> import NumericPrelude.Base as P
>>> import Prelude ()

newtype T a Source #

Constructors

Cons 

Fields

Instances

Instances details
Functor T Source # 
Instance details

Defined in MathObj.PowerSeries

Methods

fmap :: (a -> b) -> T a -> T b #

(<$) :: a -> T b -> T a #

C T Source # 
Instance details

Defined in MathObj.PowerSeries

Methods

zero :: C a => T a Source #

(<+>) :: C a => T a -> T a -> T a Source #

(*>) :: C a => a -> T a -> T a Source #

C a b => C a (T b) Source # 
Instance details

Defined in MathObj.PowerSeries

Methods

(*>) :: a -> T b -> T b Source #

(C a, C a b) => C a (T b) Source # 
Instance details

Defined in MathObj.PowerSeries

(Eq a, C a) => Eq (T a) Source # 
Instance details

Defined in MathObj.PowerSeries

Methods

(==) :: T a -> T a -> Bool #

(/=) :: T a -> T a -> Bool #

(C a, Ord a) => Ord (T a) Source # 
Instance details

Defined in MathObj.PowerSeries

Methods

compare :: T a -> T a -> Ordering #

(<) :: T a -> T a -> Bool #

(<=) :: T a -> T a -> Bool #

(>) :: T a -> T a -> Bool #

(>=) :: T a -> T a -> Bool #

max :: T a -> T a -> T a #

min :: T a -> T a -> T a #

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

Defined in MathObj.PowerSeries

Methods

showsPrec :: Int -> T a -> ShowS #

show :: T a -> String #

showList :: [T a] -> ShowS #

C a => C (T a) Source # 
Instance details

Defined in MathObj.PowerSeries

Methods

zero :: T a Source #

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

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

negate :: T a -> T a Source #

C a => C (T a) Source #
QC.choose (1,10) /\ \expon (QC.Positive x) xs -> let xt = x:xs in  equalTrunc 15 (PS.pow (const x) (1 % expon) (PST.coeffs (PST.fromCoeffs xt ^ expon)) ++ repeat zero) (xt ++ repeat zero)
Instance details

Defined in MathObj.PowerSeries

Methods

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

one :: T a Source #

fromInteger :: Integer -> T a Source #

(^) :: T a -> Integer -> T a Source #

(C a, C a) => C (T a) Source # 
Instance details

Defined in MathObj.PowerSeries

Methods

div :: T a -> T a -> T a Source #

mod :: T a -> T a -> T a Source #

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

C a => C (T a) Source # 
Instance details

Defined in MathObj.PowerSeries

Methods

differentiate :: T a -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.PowerSeries

Methods

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

recip :: T a -> T a Source #

fromRational' :: Rational -> T a Source #

(^-) :: T a -> Integer -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.PowerSeries

Methods

sqrt :: T a -> T a Source #

root :: Integer -> T a -> T a Source #

(^/) :: T a -> Rational -> T a Source #

C a => C (T a) Source # 
Instance details

Defined in MathObj.PowerSeries

Methods

pi :: T a Source #

exp :: T a -> T a Source #

log :: T a -> T a Source #

logBase :: T a -> T a -> T a Source #

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

sin :: T a -> T a Source #

cos :: T a -> T a Source #

tan :: T a -> T a Source #

asin :: T a -> T a Source #

acos :: T a -> T a Source #

atan :: T a -> T a Source #

sinh :: T a -> T a Source #

cosh :: T a -> T a Source #

tanh :: T a -> T a Source #

asinh :: T a -> T a Source #

acosh :: T a -> T a Source #

atanh :: T a -> T a Source #

fromCoeffs :: [a] -> T a Source #

lift0 :: [a] -> T a Source #

lift1 :: ([a] -> [a]) -> T a -> T a Source #

lift2 :: ([a] -> [a] -> [a]) -> T a -> T a -> T a Source #

const :: a -> T a Source #

truncate :: Int -> T a -> T a Source #

evaluate :: C a => T a -> a -> a Source #

Evaluate (truncated) power series.

evaluateCoeffVector :: C a v => T v -> a -> v Source #

Evaluate (truncated) power series.

evaluateArgVector :: (C a v, C v) => T a -> v -> v Source #

approximate :: C a => T a -> a -> [a] Source #

Evaluate approximations that is evaluate all truncations of the series.

approximateCoeffVector :: C a v => T v -> a -> [v] Source #

Evaluate approximations that is evaluate all truncations of the series.

approximateArgVector :: (C a v, C v) => T a -> v -> [v] Source #

Evaluate approximations that is evaluate all truncations of the series.

compose :: (C a, C a) => T a -> T a -> T a Source #

It fulfills evaluate x . evaluate y == evaluate (compose x y)

shrink :: C a => a -> T a -> T a Source #

dilate :: C a => a -> T a -> T a Source #