Safe Haskell | None |
---|---|
Language | Haskell98 |
Power series, either finite or unbounded. (zipWith does exactly the right thing to make it work almost transparently.)
Synopsis
- newtype T a = Cons {
- coeffs :: [a]
- 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
- evaluate :: C a => T a -> a -> a
- evaluateCoeffVector :: C a v => T v -> a -> v
- evaluateArgVector :: (C a v, C v) => T a -> v -> v
- approximate :: C a => T a -> a -> [a]
- approximateCoeffVector :: C a v => T v -> a -> [v]
- approximateArgVector :: (C a v, C v) => T a -> v -> [v]
- compose :: (C a, C a) => T a -> T a -> T a
- shrink :: C a => a -> T a -> T a
- dilate :: C a => a -> T a -> T a
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 ()
Instances
Functor T Source # | |
C T Source # | |
C a b => C a (T b) Source # | |
(C a, C a b) => C a (T b) Source # | |
Defined in MathObj.PowerSeries | |
(Eq a, C a) => Eq (T a) Source # | |
(C a, Ord a) => Ord (T a) Source # | |
Show a => Show (T a) Source # | |
C a => C (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) |
(C a, C a) => C (T a) Source # | |
C a => C (T a) Source # | |
Defined in MathObj.PowerSeries differentiate :: T a -> T a Source # | |
C a => C (T a) Source # | |
C a => C (T a) Source # | |
C a => C (T a) Source # | |
fromCoeffs :: [a] -> T a Source #
evaluateCoeffVector :: C a v => T v -> a -> v Source #
Evaluate (truncated) power series.
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.