Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ararslan/fdm.rkt
Derivatives by finite differences in Racket
https://github.com/ararslan/fdm.rkt
derivatives finite-difference-method racket
Last synced: about 2 months ago
JSON representation
Derivatives by finite differences in Racket
- Host: GitHub
- URL: https://github.com/ararslan/fdm.rkt
- Owner: ararslan
- License: bsd-2-clause
- Created: 2019-11-15T06:24:21.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-21T18:26:42.000Z (almost 5 years ago)
- Last Synced: 2024-10-30T18:47:59.201Z (3 months ago)
- Topics: derivatives, finite-difference-method, racket
- Language: Racket
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# fdm.rkt
[![Travis](https://travis-ci.org/ararslan/fdm.rkt.svg?branch=master)](https://travis-ci.org/ararslan/fdm.rkt)
[![Coveralls](https://coveralls.io/repos/github/ararslan/fdm.rkt/badge.svg?branch=master)](https://coveralls.io/github/ararslan/fdm.rkt?branch=master)[Finite difference](https://en.wikipedia.org/wiki/Finite_difference) methods for
estimating derivatives in Racket.
The API is loosely based on that of [fdm](https://github.com/wesselb/fdm) and
[FiniteDifferences.jl](https://github.com/invenia/FiniteDifferences.jl) (née FDM.jl).
This package provides a small subset of the functionality provided by those.## API
```racket
(forward-grid p)
(backward-grid p)
(central-grid p)
```These functions define the grids for a forward, backward, or central finite difference
method of order `p`.```racket
(dfdx g p q f x
#:adapt
#:condition
#:eps
#:bound)
```Compute the `q`th derivative of the univariate, real-valued function `f` at `x` using a
finite difference method of order `p` with a grid defined by `g`.
`g` should be one of the aforementioned functions.
The keyword arguments are:* `adapt`: The number of adaptive steps to use to improve the estimate of `bound`.
Defaults to 1. Set to 0 to disable adaptive bound computation.
* `condition`: The [condition number](https://en.wikipedia.org/wiki/Condition_number)
used when computing bounds. Defaults to 100.
* `eps`: The assumed roundoff error. Defaults to `epsilon.0`.
* `bound`: Bound on the value of the function `f` and its derivatives at `x`. This
value is computed and should not generally need to be specified.