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

CompatHelper: bump compat for "ForwardDiff" to "1.0"

Open github-actions[bot] opened this issue 8 months ago • 3 comments

This pull request changes the compat entry for the ForwardDiff package from 0.10.36 to 0.10.36, 1.0.

This keeps the compat entries for earlier versions.

Note: I have not tested your package with this new compat entry. It is your responsibility to make sure that your package tests pass before you merge this pull request.

github-actions[bot] avatar Mar 27 '25 03:03 github-actions[bot]

It looks like something really did happen to Akima derivatives?

ChrisRackauckas avatar Apr 07 '25 15:04 ChrisRackauckas

I'll check it out.

oscardssmith avatar Apr 07 '25 15:04 oscardssmith

Specifically the thing happening is that ForwardDiff.derivative has changed which branch of the derivative we take. MWE:

u = [0.0, 2.0, 1.0, 3.0, 2.0, 6.0, 5.5, 5.5, 2.7, 5.1, 3.0]
t = collect(0.0:10.0)
func = AkimaInterpolation(u, t)
julia> derivative(func, 1.0, 2)
-9.0

julia> derivative(func, prevfloat(1.0), 2)
-3.0

julia> derivative(func, nextfloat(1.0), 2)
-8.999999999999996

which reduces to

julia> searchsortedfirst([0.0, 1.0, 2.0, 3.0], 1.0)
2

julia> searchsortedfirst([0.0, 1.0, 2.0, 3.0], ForwardDiff.Dual(1.0, (1.0,)))
3

oscardssmith avatar Apr 07 '25 16:04 oscardssmith

This is necessary for bumping MTK's ForwardDiff compat

AayushSabharwal avatar Jul 08 '25 16:07 AayushSabharwal