dual_num 0.2.2

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

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