Giter Site home page Giter Site logo

dualnumbers's Introduction

DualNumbers

GitHub Workflow Status

A simple toy implementation of the hypercomplex number system called the Dual numbers.

Dual numbers are of the form $z = a + b\varepsilon$ where $a,b\in\mathbb{R}$, where $\varepsilon^2=0$.

Whereas for standard real $(\mathbb{R})$ algebra:

$$ \begin{align*} (a + b)(x + y) &= ax +ay + bx + by\\ (a + b)^2 &= a^2 + 2ab + b^2 \end{align*} $$

And how in complex $(\mathbb{C})$ domain, where $i^2=-1$:

$$ \begin{align*} (a + bi)(x + yi) &= ax - by + (ay + bx)i\\ (a + bi)^2 &= a^2 + 2abi - b^2 \end{align*} $$

In the Dual $(\mathbb{D})$ number system:

$$ \begin{align*} (a + b\varepsilon)(x + y\varepsilon) &= ax + (ay + bx)\varepsilon\\ (a + b\varepsilon)^2 &= a^2 + 2ab\varepsilon \end{align*} $$

One property of interest is automatic differentiation. For any analytic function $f:\mathbb{R}\mapsto\mathbb{R}$, it can be shown that the domain can be extended to include the Dual numbers in such a way that, for $z\in\mathbb{D}$, where $x,y\in\mathbb{R}$, $z=(x + y\varepsilon)$:

$$ f(z) = f(a) + bf'(a)\varepsilon $$

This is done by manipulating the function's Taylor Series, making use of the fact that, $\forall n\geq 2,,\varepsilon^n=0$, which gives the prior result.

Resources:

  • F. Messelmi,
    Analysis of Dual Functions,
    Annual Review of Chaos Theory, Bifurcations and Dynamical Systems Vol. 4, (2013) 37-54,
    DOI:10.13140/2.1.1006.4006

  • Behr, Nicolas, Giuseppe Dattoli, Ambra Lattanzi, and Silvia Licciardi,
    Dual Numbers and Operational Umbral Methods, Axioms 8, no. 3: 77 (2019)
    DOI:10.3390/axioms8030077

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.