dualnumbers 1.0.2

A dual number type for automatic differentation.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

dualnumbers

A dual number type for automatic differentiation.

Build StatusCoverage Status

Introduction

Dual numbers are similar to complex numbers a pair of two numbers. A dual number is written as a + εb, where a is called the real part and b is called the dual part of the number. ε² is defined to be zero.

Given a function f(x) and a value f(a) which is the result of the function for x = a, then f(a + εb) is equal to f(a) + εb f '* (a). This can be shown with a Taylor series.

In practice this means that we get the derivative of an arbitrary complicated function for free, if we calculate it with a dual number. All we have to do is to set the dual part of the variable, by which we want to differentiate, to one (all other dual parts should be zero). The result of the function will contain its derivative as the dual part.

For more information about theory see https://en.wikipedia.org/wiki/Dualnumber https://en.wikipedia.org/wiki/Automaticdifferentiation#Automaticdifferentiationusingdualnumbers

Documentation

The documentation can be found here. There are also some examples in the documentation.

Current Limitations

  • ^^ operator only works for integral exponents

Contributing

Feel free to create issues or pull requests. A unittest is expected for every added function.

Licence

Distributed under the Boost Software Licence. See licence file for more information.

Authors:
  • René Heldmaier and others (see individual files)
Dependencies:
none
Versions:
1.0.2 2019-Nov-17
1.0.1 2019-Nov-16
1.0.0 2019-Nov-16
~master 2019-Nov-17
Show all 4 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 11 downloads total

Score:
0.6
Short URL:
dualnumbers.dub.pm