6#ifndef THEORETICA_TAYLOR_H
7#define THEORETICA_TAYLOR_H
9#include "../polynomial/polynomial.h"
10#include "../autodiff/dual.h"
11#include "../autodiff/dual2.h"
29 template<
typename DualFunction>
52 template<
typename Dual2Function>
Second order dual number class.
Definition dual2.h:29
real Dual2() const
Return second order dual part.
Definition dual2.h:95
real Re() const
Return real part.
Definition dual2.h:85
real Dual1() const
Return first order dual part.
Definition dual2.h:90
Dual number class.
Definition dual.h:28
const real & Dual() const
Return dual part.
Definition dual.h:96
const real & Re() const
Return real part.
Definition dual.h:75
A polynomial of arbitrary order with coefficients of a specified type.
Definition polynomial.h:28
polynomial< real > expand_quadratic(Dual2Function f, real x0=0)
Computes the second order Taylor expansion of a generic function around x0, computed using dual numbe...
Definition taylor.h:53
polynomial< real > expand_linear(DualFunction f, real x0=0)
Computes the first order Taylor expansion of a generic function around x0, computed using dual number...
Definition taylor.h:30
Main namespace of the library which contains all functions and objects.
Definition algebra.h:27
double real
A real number, defined as a floating point type.
Definition constants.h:207
Vector make_error()
Create a vector representing an error state, with all NaN values.
Definition algebra.h:103
dual2 square(dual2 x)
Return the square of a second order dual number.
Definition dual2_functions.h:23