ForwardDiff.jl icon indicating copy to clipboard operation
ForwardDiff.jl copied to clipboard

Forward Mode Automatic Differentiation for Julia

Results 187 ForwardDiff.jl issues
Sort by recently updated
recently updated
newest added

Fixes #624 Also fixes #651 and closes #665, since it turns out that this change requires that fix too.

I am modeling in Turing.jl some process in which I use Gamma prior to parametrize Truncated Poisson and I use NUTs sampler. However, my model has nested dependence and I...

Fixes #651 This change is also required by #664, so if that PR is accepted then it supersedes this PR.

as far as i understand, the type of `one(T)` is not necessarily `T` (https://github.com/JuliaPhysics/Measurements.jl/issues/134 for example). but `construct_seeds` uses this: https://github.com/JuliaDiff/ForwardDiff.jl/blob/50ec9a1ccb0a4390edc88398aa322656d58e7202/src/partials.jl#L9-L12 Maybe using `oneunit` there is more correct?

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. Release notes Sourced from actions/checkout's releases. v4.0.0 What's Changed Update default runtime to node20 by @​takost in actions/checkout#1436 Support fetching without the --progress option...

dependencies

If I have a function `f(x::Real)::Real` I have two options for computing `f(x), f'(x), f''(x)`: ```julia using ForwardDiff, DiffResults, StaticArrays, BenchmarkTools function computehessian(f, x::AbstractArray) result = DiffResults.HessianResult(x) result = ForwardDiff.hessian!(result,...

Running the following code ```julia using ForwardDiff using StaticArrays f(x)=SA[x[1]^2+x[2]^2, x[2]^2+x[3]^2] x=SA[1.0,2,3] y=f(x) imdr=DiffResults.JacobianResult(y,x) @code_warntype ForwardDiff.jacobian!(imdr,f,x) ``` shows up as not type stable for me in Julia 1.8.5. Maybe also...

Consider a function $f(t)$ such that $f(0)$ is the fully zero sparse vector. Apparently, ForwardDiff cannot compute $f'(0)$. ```julia julia> using ForwardDiff: derivative julia> using SparseArrays: sparse julia> x =...

bug

Hi, Can I run ForwardDiff.derivative(f,float(x)) on a weird recursive function like "eval_tree_array", instead of a more explicit function like f(x) = sin(x)? My code: ``` from pysr import PySRRegressor objective...

This, [from discourse](https://discourse.julialang.org/t/bug-in-forward-diff-for-complex-valued-function/100119), looks like a bug: ```jl julia> p(s) = exp(1im*(2π*s - π/2)); julia> p′(s) = ForwardDiff.derivative(p, s); julia> p″(s) = ForwardDiff.derivative(p′, s); julia> p″(0.2499999999999) -39.47841760435743 + 2.4807694081270598e-11im julia>...