  | NumericPrelude-0.0: An experimental alternative hierarchy of numeric type classes | Contents | Index |  
  | 
 | 
 | 
 | 
 | 
| Description | 
| Power series, either finite or unbounded.  (zipWith does exactly the
right thing to make it work almost transparently.)
 | 
 | 
| Synopsis | 
 | 
| newtype T a = Cons {} |   |  | fromCoeffs :: [a] -> T a |   |  | lift0 :: [a] -> T a |   |  | lift1 :: ([a] -> [a]) -> T a -> T a |   |  | lift2 :: ([a] -> [a] -> [a]) -> T a -> T a -> T a |   |  | const :: a -> T a |   |  | appPrec :: Int |   |  | truncate :: Int -> T a -> T a |   |  | eval :: C a b => [b] -> a -> b |   |  | evaluate :: C a b => T b -> a -> b |   |  | approx :: C a b => [b] -> a -> [b] |   |  | approximate :: C a b => T b -> a -> [b] |   |  | alternate :: C a => [a] -> [a] |   |  | holes2 :: C a => [a] -> [a] |   |  | holes2alternate :: C a => [a] -> [a] |   |  | add :: C a => [a] -> [a] -> [a] |   |  | sub :: C a => [a] -> [a] -> [a] |   |  | negate :: C a => [a] -> [a] |   |  | scale :: C a => a -> [a] -> [a] |   |  | mul :: C a => [a] -> [a] -> [a] |   |  | stripLeadZero :: C a => [a] -> [a] -> ([a], [a]) |   |  | divide :: C a => [a] -> [a] -> [a] |   |  | divideStripZero :: (C a, C a) => [a] -> [a] -> [a] |   |  | divMod :: (C a, C a) => [a] -> [a] -> ([a], [a]) |   |  | progression :: C a => [a] |   |  | recipProgression :: C a => [a] |   |  | differentiate :: C a => [a] -> [a] |   |  | integrate :: C a => a -> [a] -> [a] |   |  | sqrt :: C a => (a -> a) -> [a] -> [a] |   |  | pow :: C a => (a -> a) -> a -> [a] -> [a] |   |  | exp :: C a => (a -> a) -> [a] -> [a] |   |  | sinCos :: C a => (a -> (a, a)) -> [a] -> ([a], [a]) |   |  | sinCosScalar :: C a => a -> (a, a) |   |  | sin :: C a => (a -> (a, a)) -> [a] -> [a] |   |  | cos :: C a => (a -> (a, a)) -> [a] -> [a] |   |  | tan :: C a => (a -> (a, a)) -> [a] -> [a] |   |  | log :: C a => (a -> a) -> [a] -> [a] |   |  | derivedLog :: C a => [a] -> [a] |   |  | atan :: C a => (a -> a) -> [a] -> [a] |   |  | asin :: C a => (a -> a) -> (a -> a) -> [a] -> [a] |   |  | acos :: C a => (a -> a) -> (a -> a) -> [a] -> [a] |   |  | compose :: (C a, C a) => T a -> T a -> T a |   |  | comp :: C a => [a] -> [a] -> [a] |   |  | composeTaylor :: C a => (a -> [a]) -> [a] -> [a] |   |  | inv :: C a => [a] -> (a, [a]) |  
  | 
 | 
| Documentation | 
 | 
| newtype T a | 
| Constructors |   |    Instances |   |  
  | 
 | 
| fromCoeffs :: [a] -> T a | 
 | 
| lift0 :: [a] -> T a | 
 | 
| lift1 :: ([a] -> [a]) -> T a -> T a | 
 | 
| lift2 :: ([a] -> [a] -> [a]) -> T a -> T a -> T a | 
 | 
| const :: a -> T a | 
 | 
| appPrec :: Int | 
 | 
| truncate :: Int -> T a -> T a | 
 | 
| eval :: C a b => [b] -> a -> b | 
| Evaluate (truncated) power series.
 | 
 | 
| evaluate :: C a b => T b -> a -> b | 
 | 
| approx :: C a b => [b] -> a -> [b] | 
| Evaluate approximations that is evaluated all truncations of the series.
 | 
 | 
| approximate :: C a b => T b -> a -> [b] | 
 | 
| Simple series manipulation 
 | 
 | 
| alternate :: C a => [a] -> [a] | 
| For the series of a real function f
compute the series for x -> f (-x)
 | 
 | 
| holes2 :: C a => [a] -> [a] | 
| For the series of a real function f
compute the series for x -> (f x + f (-x)) / 2
 | 
 | 
| holes2alternate :: C a => [a] -> [a] | 
| For the series of a real function f
compute the real series for x -> (f (i*x) + f (-i*x)) / 2
 | 
 | 
| Series arithmetic 
 | 
 | 
| add :: C a => [a] -> [a] -> [a] | 
 | 
| sub :: C a => [a] -> [a] -> [a] | 
 | 
| negate :: C a => [a] -> [a] | 
 | 
| scale :: C a => a -> [a] -> [a] | 
 | 
| mul :: C a => [a] -> [a] -> [a] | 
 | 
| stripLeadZero :: C a => [a] -> [a] -> ([a], [a]) | 
 | 
| divide :: C a => [a] -> [a] -> [a] | 
Divide two series where the absolute term of the divisor is non-zero.
That is, power series with leading non-zero terms are the units
in the ring of power series.
 Knuth: Seminumerical algorithms
  | 
 | 
| divideStripZero :: (C a, C a) => [a] -> [a] -> [a] | 
| Divide two series also if the divisor has leading zeros.
 | 
 | 
| divMod :: (C a, C a) => [a] -> [a] -> ([a], [a]) | 
 | 
| progression :: C a => [a] | 
 | 
| recipProgression :: C a => [a] | 
 | 
| differentiate :: C a => [a] -> [a] | 
 | 
| integrate :: C a => a -> [a] -> [a] | 
 | 
| sqrt :: C a => (a -> a) -> [a] -> [a] | 
| We need to compute the square root only of the first term.
That is, if the first term is rational,
then all terms of the series are rational.
 | 
 | 
| pow :: C a => (a -> a) -> a -> [a] -> [a] | 
| Input series must start with non-zero term.
 | 
 | 
| exp :: C a => (a -> a) -> [a] -> [a] | 
The first term needs a transcendent computation but the others do not.
That's why we accept a function which computes the first term.
  (exp . x)' =   (exp . x) * x'
 (sin . x)' =   (cos . x) * x'
 (cos . x)' = - (sin . x) * x'
  | 
 | 
| sinCos :: C a => (a -> (a, a)) -> [a] -> ([a], [a]) | 
 | 
| sinCosScalar :: C a => a -> (a, a) | 
 | 
| sin :: C a => (a -> (a, a)) -> [a] -> [a] | 
 | 
| cos :: C a => (a -> (a, a)) -> [a] -> [a] | 
 | 
| tan :: C a => (a -> (a, a)) -> [a] -> [a] | 
 | 
| log :: C a => (a -> a) -> [a] -> [a] | 
| Input series must start with non-zero term.
 | 
 | 
| derivedLog :: C a => [a] -> [a] | 
| Computes (log x)', that is x'/x
 | 
 | 
| atan :: C a => (a -> a) -> [a] -> [a] | 
 | 
| asin :: C a => (a -> a) -> (a -> a) -> [a] -> [a] | 
 | 
| acos :: C a => (a -> a) -> (a -> a) -> [a] -> [a] | 
 | 
| compose :: (C a, C a) => T a -> T a -> T a | 
| It fulfills
   evaluate x . evaluate y == evaluate (compose x y) 
 | 
 | 
| comp :: C a => [a] -> [a] -> [a] | 
| Since the inner series must start with a zero,
the first term is omitted in y.
 | 
 | 
| composeTaylor :: C a => (a -> [a]) -> [a] -> [a] | 
| Compose two power series where the outer series
can be developed for any expansion point.
To be more precise:
The outer series must be expanded with respect to the leading term
of the inner series.
 | 
 | 
| inv :: C a => [a] -> (a, [a]) | 
This function returns the series of the function in the form:
(point of the expansion, power series)
 This is exceptionally slow and needs cubic run-time.
  | 
 | 
| Produced by Haddock version 0.7 |