RustAD - Rust Auto-Differentiation

Crates.io lib.rs.io docs

A restrictive WIP beginnings of a library attempting to implement auto-differentiation in Rust.

Why would I use this over \ You wouldn't, not yet anyway. I'd say wait until support for ndarray is more comprehensive, then this becomes probably the most convenient Rust AutoDiff library.

It's all messy be warned.

Status

*typeof (e.g. decltype) not being currently implemented in Rust makes support more difficult.

°Support limited to the basic blas-like operations.

Application

Auto-differentiation is implemented via 2 attribute procedural macros, e.g.

```rust

[rustad::forwardautodiff]

fn function_name(x: f32, y: f32) -> f32 { let p = 7.0f32 * x; let r = 10f32 - y; let q = p * x * 5.f32; let v = 2f32 * p * q + 3f32 * r; return v; } rust

[rustad::reverseautodiff]

fn function_name(x: f32, y: f32) -> f32 { let a = 7f32 * x; let b = 3.0f32 * x; let c = x + b; let d = y + b + c; return d; } ```