numeric-prelude-0.4.2: 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

newtype T a Source

Constructors

Cons 

Fields

coeffs :: [a]
 

Instances

Functor T 
C T 
C a b => C a (T b) 
(C a, C a b) => C a (T b) 
(Eq a, C a) => Eq (T a) 
(Ord a, C a) => Ord (T a) 
Show a => Show (T a) 
C a => C (T a) 
C a => C (T a) 
C a => C (T a) 
(C a, C a) => C (T a) 
C a => C (T a) 
C a => C (T a) 
C a => C (T a) 

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)