#number #dual #hyperdual #gradient #autodifferentiate

dual_num

Fully-featured Dual Number implementation with features for automatic differentiation of multivariate vectorial functions into gradients

8 releases

0.2.5 Feb 4, 2019
0.2.4 Jan 28, 2019
0.2.3 Dec 25, 2018
0.2.2 Nov 21, 2018
0.1.1 Jun 5, 2017

#25 in Value formatting

Download history 4/week @ 2018-10-20 18/week @ 2018-10-27 14/week @ 2018-11-03 20/week @ 2018-11-10 27/week @ 2018-11-17 11/week @ 2018-11-24 16/week @ 2018-12-01 9/week @ 2018-12-08 9/week @ 2018-12-15 45/week @ 2018-12-22 6/week @ 2018-12-29 27/week @ 2019-01-05 10/week @ 2019-01-12 8/week @ 2019-01-19 13/week @ 2019-01-26

70 downloads per month
Used in 1 crate

MIT license

27KB
756 lines

dual_num Build Status

Fully-featured Dual Number implementation with features for automatic differentiation of multivariate vectorial functions into gradients.

Usage

extern crate dual_num;

use dual_num::{Dual, Float, differentiate};

fn main() {
    // find partial derivative at x=4.0
    println!("{:.5}", differentiate(4.0f64, |x| {
        x.sqrt() + Dual::from_real(1.0)
    })); // 0.25000
}
Previous Work

lib.rs:

Dual Numbers

Fully-featured Dual Number implementation with features for automatic differentiation of multivariate vectorial functions into gradients.

Usage

extern crate dual_num;

use dual_num::{Dual, Float, differentiate};

fn main() {
    // find partial derivative at x=4.0
    println!("{:.5}", differentiate(4.0f64, |x| {
        x.sqrt() + Dual::from_real(1.0)
    })); // 0.25000
}
Previous Work

Dependencies

~3MB
~49K SLoC