Skip to content

recommend robust method for iteratively calculated functions #170

@tpapp

Description

@tpapp

I have a computation that solves an implicit equation using iterative numerical methods (bisection, Brent, etc). I would like to use FiniteDifferences.jl for unit testing partials I write for ChainRulesCore.

The problem is that since the calculated function is not technically continuous, using eg central_fdm(5, 1) gives me bogus results (occasionally off by a factor of 5--10). I had some success with a high number of grid points, eg central_fdm(20, 1), but too much adaptation (eg 2 steps) makes things go bad again.

I would appreciate recommendations on how to deal with this in a robust way for unit testing. Since it is for testing, it does not have to be super-fast, just robust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions