Nonsmooth AD Demo

Compute Clarke subgradients of |x|, max(x,0), floor(x) live in WASM.

loading…

Subgradient of |x|

Enter x. At x=0 the subgradient is [-1, 1].

Forward AD

Compute f(x) and f'(x) for f(x) = x³ - 3x + 1.