Skip to content

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

Closed
github-actions[bot] wants to merge 1 commit intomasterfrom
compathelper/new_version/2025-03-27-03-24-35-400-2041203007
Closed

CompatHelper: bump compat for "ForwardDiff" to "1.0"#414
github-actions[bot] wants to merge 1 commit intomasterfrom
compathelper/new_version/2025-03-27-03-24-35-400-2041203007

Conversation

@github-actions
Copy link
Contributor

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.

@ChrisRackauckas
Copy link
Member

It looks like something really did happen to Akima derivatives?

@oscardssmith
Copy link
Member

I'll check it out.

@oscardssmith
Copy link
Member

oscardssmith commented Apr 7, 2025

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

@AayushSabharwal
Copy link
Member

This is necessary for bumping MTK's ForwardDiff compat

@ChrisRackauckas ChrisRackauckas deleted the compathelper/new_version/2025-03-27-03-24-35-400-2041203007 branch July 12, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants