ForwardDiff.jl
ForwardDiff.jl copied to clipboard
Forward Mode Automatic Differentiation for Julia
This replaces https://github.com/JuliaDiff/ForwardDiff.jl/pull/541 and introduces overrides needed for FFTW as extensions. Note it will make FFTW and AbstractFFTs dependencies in Julia
Replace an anonymous function with Base.Fix1 for type stability in some cases, see #639
I think the following should work: ```julia julia> ForwardDiff.derivative(identity, 1+im) ERROR: DimensionMismatch: derivative(f, x) expects that x is a real number (does not support Wirtinger derivatives). Separate real and imaginary...
Arithmetic operations between `Num` and `Dual` based on `Num` is not clearly defined. The basic usecase is this: ```julia using ForwardDiff, Symbolics.jl @variables a, x f = x -> a*x...
First, for context: I am new to both Julia and ForwardDiff, but I am experienced at coding. For my project, I need to compute the first derivative of a 2x2...
Fixes this: ```julia ForwardDiff.gradient(sum, cu(rand(10))) # Error: scalar indexing ``` My adhoc tests suggest no performance impact on 1.8.3. for `result::Vector`, however, there is an extra `(2 allocations: 80 bytes)`...
reproducing script is below ``` julia (@v1.8) pkg> activate --temp Activating new project at `/var/folders/29/j2y0t06d1918t1tymbv45wgr0000gn/T/jl_T8WfIS` (jl_T8WfIS) pkg> add ForwardDiff, FFTW Updating registry at `~/.julia/registries/General.toml` Resolving package versions... Installed ChainRulesCore ─...
replaces #652 , fixes #651
This checks whether `hypot` of the value component is zero, and if so switches to a next-order method. ~This may be slightly controversial since it exploits the difference between 0.0...
IntervalArithmetic.jl may abandon support for `==` among intervals (https://github.com/JuliaIntervals/IntervalArithmetic.jl/pull/571). To support specialization for specific Number subtypes, this makes `iszero_tuple` into a "trait"-dispatched function, first unwrapping all the way down to...