Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex-valued arguments #43

Open
baggepinnen opened this issue May 19, 2023 · 2 comments
Open

Complex-valued arguments #43

baggepinnen opened this issue May 19, 2023 · 2 comments
Labels
feature New feature or request

Comments

@baggepinnen
Copy link
Contributor

baggepinnen commented May 19, 2023

Currently, the implicit function is defined for real arguments only

function (implicit::ImplicitFunction)(
    x_and_dx::AbstractArray{Dual{T,R,N}}; kwargs...
) where {T,R,N}

It would be useful to have it work for complex-valued arguments as well. Naively defining the same function with modified type signature did not seem to work.

@gdalle
Copy link
Collaborator

gdalle commented May 19, 2023

I have no clue how complex differentiation works, does the implicit function theorem apply too?

@gdalle gdalle added the feature New feature or request label May 23, 2023
@gdalle
Copy link
Collaborator

gdalle commented May 30, 2023

Quote from @baggepinnen:

The problem is that the duals are placed inside the Complex type, i.e., Complex{Dual}, and handling might require overloading ForwardDiff.value so that
x = value.(x_and_dx)
works as expected, and the same for partials etc. I tried very briefly but didn't get it to work, so it probably requires some digging to figure out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants