Skip to content
New issue

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

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

Already on GitHub? # to your account

build_function does not seem to work for complex-valued functions #1391

Open
nabil-atlam opened this issue Jan 1, 2025 · 0 comments
Open

Comments

@nabil-atlam
Copy link

nabil-atlam commented Jan 1, 2025

In this code, I have an expression for a complex-valued function that I am trying to build into a callable function. However, it does not evaluate the built function when given sample numerical inputs.

using Symbolics
@variables x::Float64
@variables fexpr::ComplexF64
dx = Differential(x)
fexpr = 1.0 + cis(x)
dfexpr = expand_derivatives(dx(fexpr))

_dfexpr = build_function(dfexpr, x)
df = eval(_dfexpr)
result = df(0.0)
println(result)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant