dual_num 0.1.0

Dual Number Implementation combined from multiple other implementations
dual_num-0.1.0 doesn't have any documentation.

Dual Numbers

This is a dual number implementation scavenged from other dual number libraries and articles around the web, including:

The difference being is that I have checked each method against Wolfram Alpha for correctness and will keep this implementation up to date and working with the latest stable Rust and num-traits crate.

Usage

extern crate dual_num;

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

fn test<F: Float>(x: F) -> F {
    x.sqrt() + F::from(1.0).unwrap()
}

fn main() {
    // find partial derivative at x=4.0
    let result = differentiate(4.0f64, test);

    println!("{:.5}", result); // 0.25000
}