A restrictive WIP beginnings of a library attempting to implement auto-differentiation in Rust.
Why would I use this over \
It's all messy be warned.
f32
, u32
etc.) support*if
, if else
and else
supportfor
, while
and loop
support*typeof
(e.g. decltype
) not being currently implemented in Rust makes support more difficult.
°Support limited to the basic blas-like operations.
Auto-differentiation is implemented via 2 attribute procedural macros, e.g.
```rust
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
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; } ```