numeric-prelude- An experimental alternative hierarchy of numeric type classes

Safe HaskellNone



Two-variate power series.



newtype T a Source

In order to handle both variables equivalently we maintain a list of coefficients for terms of the same total degree. That is

 eval [[a], [b,c], [d,e,f]] (x,y) ==
    a + b*x+c*y + d*x^2+e*x*y+f*y^2

Although the sub-lists are always finite and thus are more like polynomials than power series, division and square root computation are easier to implement for power series.




coeffs :: T a


Functor T 
C T 
(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 (T a) 

isValid :: [[a]] -> BoolSource

check :: [[a]] -> [[a]]Source

fromCoeffs :: [[a]] -> T aSource

fromPowerSeries0 :: C a => T a -> T aSource

fromPowerSeries1 :: C a => T a -> T aSource

lift0 :: T a -> T aSource

lift1 :: (T a -> T a) -> T a -> T aSource

lift2 :: (T a -> T a -> T a) -> T a -> T a -> T aSource

const :: a -> T aSource