|
| 1 | +# Release 0.41.0 (2026-03-15) |
| 2 | + |
| 3 | +## Replace `enum AD` with const-generic `Jet<N>` (**Breaking Change**) |
| 4 | + |
| 5 | +### Core |
| 6 | +- Replace `enum AD { AD0(f64), AD1(f64,f64), AD2(f64,f64,f64) }` with `struct Jet<const N: usize>` |
| 7 | +- Normalized Taylor coefficients — all arithmetic uses simple convolution (no binomial coefficients) |
| 8 | +- Arbitrary-order forward AD: `Jet<1>`, `Jet<2>`, ..., `Jet<10>`, etc. |
| 9 | +- Type aliases: `Dual = Jet<1>`, `HyperDual = Jet<2>` |
| 10 | +- Direct `sqrt` recurrence (instead of `powf(0.5)`) |
| 11 | + |
| 12 | +### Proc Macro (`peroxide-ad`) |
| 13 | +- `#[ad_function]` now generates `f_ad<const JET_ORDER: usize>(x: Jet<JET_ORDER>) -> Jet<JET_ORDER>` — arbitrary-order differentiation |
| 14 | +- `ad_closure!` generates `Jet<1>` closure |
| 15 | + |
| 16 | +### Backward Compatibility |
| 17 | +- `AD` type alias (`= Jet<2>`), `AD0`, `AD1`, `AD2` constructor functions preserved |
| 18 | +- `ADFn`, `ADVec`, `StableFn` impls preserved |
| 19 | +- `Real` trait implemented for `Jet<2>` (via `AD` alias) |
| 20 | + |
| 21 | +### Integration Updates |
| 22 | +- `jacobian()`, `newton()`, `Optimizer` updated to use `Jet<1>` internally |
| 23 | +- `newton!` macro works with new proc macro output |
| 24 | + |
| 25 | +### Documentation |
| 26 | +- KaTeX-rendered math in all doc comments (recurrences for exp, ln, sin/cos, sqrt, inverse trig) |
| 27 | +- Accuracy plot: `Jet<N>` vs finite differences |
| 28 | +- Taylor convergence plot: `sin(x)` polynomial approximation |
| 29 | +- New examples: `jet_ad.rs`, `higher_order_ad.rs` |
| 30 | +- Updated examples: `hessian.rs`, `real_trait_test.rs` |
| 31 | +- 115 new Jet-specific unit tests |
| 32 | + |
| 33 | +### Migration Guide |
| 34 | + |
| 35 | +| Old (0.40.x) | New (0.41.0) | |
| 36 | +|---|---| |
| 37 | +| `AD1(x, dx)` | `AD1(x, dx)` (still works) or `Jet::<1>::var(x)` | |
| 38 | +| `AD2(x, dx, ddx)` | `AD2(x, dx, ddx)` (still works) or `Jet::<2>::var(x)` | |
| 39 | +| `fn f(x: AD) -> AD` | `fn f(x: AD) -> AD` (still works) or `fn f(x: Jet<2>) -> Jet<2>` | |
| 40 | +| `f_ad(x: AD)` (macro) | `f_ad::<N>(x: Jet<N>)` (now generic) | |
| 41 | +| `Fn(&Vec<AD>) -> Vec<AD>` | `Fn(&Vec<AD>) -> Vec<AD>` (still works) | |
| 42 | + |
1 | 43 | # Release 0.40.2 (2026-02-06) |
2 | 44 |
|
3 | 45 | ## New DataFrame & Series Methods |
|
0 commit comments