Theoretica
A C++ numerical and automatic mathematical library
dual_functions.h File Reference

Functions defined on dual numbers for automatic differentiation. More...

#include "./dual.h"
#include "../core/real_analysis.h"

Go to the source code of this file.

Namespaces

 theoretica
 Main namespace of the library which contains all functions and objects.
 

Functions

dual theoretica::square (dual x)
 Return the square of a dual number.
 
dual theoretica::cube (dual x)
 Return the cube of a dual number.
 
dual theoretica::conjugate (dual x)
 Return the conjugate of a dual number.
 
dual theoretica::pow (dual x, int n)
 Compute the n-th power of a dual number.
 
dual theoretica::sqrt (dual x)
 Compute the square root of a dual number.
 
dual theoretica::sin (dual x)
 Compute the sine of a dual number.
 
dual theoretica::cos (dual x)
 Compute the cosine of a dual number.
 
dual theoretica::tan (dual x)
 Compute the tangent of a dual number.
 
dual theoretica::cot (dual x)
 Compute the cotangent of a dual number.
 
dual theoretica::exp (dual x)
 Compute the exponential of a dual number.
 
dual theoretica::ln (dual x)
 Compute the natural logarithm of a dual number.
 
dual theoretica::log2 (dual x)
 Compute the natural logarithm of a dual number.
 
dual theoretica::log10 (dual x)
 Compute the natural logarithm of a dual number.
 
dual theoretica::abs (dual x)
 Compute the absolute value of a dual number.
 
dual theoretica::asin (dual x)
 Compute the arcsine of a dual number.
 
dual theoretica::acos (dual x)
 Compute the arccosine of a dual number.
 
dual theoretica::atan (dual x)
 Compute the arctangent of a dual number.
 
dual theoretica::sinh (dual x)
 Compute the hyperbolic sine of a dual number.
 
dual theoretica::cosh (dual x)
 Compute the hyperbolic cosine of a dual number.
 
dual theoretica::tanh (dual x)
 Compute the hyperbolic tangent of a dual number.
 

Detailed Description

Functions defined on dual numbers for automatic differentiation.

Dual numbers can be easily used for automatic differentiation, as they behave under addition, multiplication and division as the first derivative.

Normal operations can be performed and the result will have a real part equal to the function evaluated for the given argument and a "dual" part equal to the first derivative evaluated for the given argument.