Skip to content

support complex step derivative approximation #949

@yizhang-yiz

Description

@yizhang-yiz

Summary:

This is different from #789, as there is no complex version of var involved.

For a given function f that supports complex number evaluation, calculate its derivative using complex step derivative approximation and generate var using the result.

Description:

Given

std::complex<double> f(const std::complex<double> x) {
/* ... */
}

one can calculate df/dx using complex step derivative approximation, avoiding loss of significance due to cancellation in real-number finite difference. This gives Math support in domains where complex number calculation is common (signal analysis, elector-magnetic solver, etc) and solvers are implemented with complex-number capability.

The connection of CSDA to forward-mode of AD is pointed out in Chap. 10 of GRIEWANK, A. 2000.

Current Version:

v2.18.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions