Portability | GHC only |
---|---|

Stability | experimental |

Maintainer | ekmett@gmail.com |

Safe Haskell | None |

Higher order derivatives via a "dual number tower".

- data Tower a
- auto :: Mode t => Scalar t -> t
- taylor :: Fractional a => (Tower a -> Tower a) -> a -> a -> [a]
- taylor0 :: Fractional a => (Tower a -> Tower a) -> a -> a -> [a]
- maclaurin :: Fractional a => (Tower a -> Tower a) -> a -> [a]
- maclaurin0 :: Fractional a => (Tower a -> Tower a) -> a -> [a]
- diff :: Num a => (Tower a -> Tower a) -> a -> a
- diff' :: Num a => (Tower a -> Tower a) -> a -> (a, a)
- diffs :: Num a => (Tower a -> Tower a) -> a -> [a]
- diffs0 :: Num a => (Tower a -> Tower a) -> a -> [a]
- diffsF :: (Functor f, Num a) => (Tower a -> f (Tower a)) -> a -> f [a]
- diffs0F :: (Functor f, Num a) => (Tower a -> f (Tower a)) -> a -> f [a]
- du :: (Functor f, Num a) => (f (Tower a) -> Tower a) -> f (a, a) -> a
- du' :: (Functor f, Num a) => (f (Tower a) -> Tower a) -> f (a, a) -> (a, a)
- dus :: (Functor f, Num a) => (f (Tower a) -> Tower a) -> f [a] -> [a]
- dus0 :: (Functor f, Num a) => (f (Tower a) -> Tower a) -> f [a] -> [a]
- duF :: (Functor f, Functor g, Num a) => (f (Tower a) -> g (Tower a)) -> f (a, a) -> g a
- duF' :: (Functor f, Functor g, Num a) => (f (Tower a) -> g (Tower a)) -> f (a, a) -> g (a, a)
- dusF :: (Functor f, Functor g, Num a) => (f (Tower a) -> g (Tower a)) -> f [a] -> g [a]
- dus0F :: (Functor f, Functor g, Num a) => (f (Tower a) -> g (Tower a)) -> f [a] -> g [a]

# Documentation

`Tower`

is an AD `Mode`

that calculates a tangent tower by forward AD, and provides fast `diffsUU`

, `diffsUF`

Typeable1 Tower | |

(Num a, Bounded a) => Bounded (Tower a) | |

(Num a, Enum a) => Enum (Tower a) | |

(Num a, Eq a) => Eq (Tower a) | |

Floating a => Floating (Tower a) | |

Fractional a => Fractional (Tower a) | |

Data a => Data (Tower a) | |

Num a => Num (Tower a) | |

(Num a, Ord a) => Ord (Tower a) | |

Real a => Real (Tower a) | |

RealFloat a => RealFloat (Tower a) | |

RealFrac a => RealFrac (Tower a) | |

Show a => Show (Tower a) | |

Erf a => Erf (Tower a) | |

InvErf a => InvErf (Tower a) | |

Num a => Mode (Tower a) | |

Num a => Jacobian (Tower a) |

# Taylor Series

taylor :: Fractional a => (Tower a -> Tower a) -> a -> a -> [a]Source

taylor0 :: Fractional a => (Tower a -> Tower a) -> a -> a -> [a]Source

# Maclaurin Series

maclaurin :: Fractional a => (Tower a -> Tower a) -> a -> [a]Source

maclaurin0 :: Fractional a => (Tower a -> Tower a) -> a -> [a]Source