Module

Data.Taylor

Package
purescript-taylor
Repository
paf31/purescript-taylor

Taylor series as lazy lists of coefficients.

#Taylor Source

newtype Taylor a

A Taylor series, with coefficients in the specified Semiring.

By varying the base Semiring, we can do various interesting things:

  • Using Number, we can compute arbitrary higher order derivatives of functions.
  • Using Complex, we can compute path derivatives of functions.
  • Using the Free Semiring, we can implement symbolic differentiation.

Instances

#coefficients Source

coefficients :: forall a. Taylor a -> List a

Extract the coefficients as a lazy list.

#constant Source

constant :: forall a. Semiring a => a -> Taylor a

A Taylor series representing a constant function.

#eval0 Source

eval0 :: forall a. Taylor a -> a

Evaluate a Taylor series at zero.

#d Source

d :: forall a. Semiring a => Taylor a -> Taylor a

The derivative of a Taylor series.

#integrate Source

integrate :: forall a. Field a => Taylor a -> Taylor a

The integral of a Taylor series.

#x Source

x :: forall a. Semiring a => Taylor a

A Taylor series which has a non-zero coefficient only for the x term.

Modules
Data.Taylor