Skip to content

Commit bb899dd

Browse files
authored
add notes on differences from FiniteDiff.jl
1 parent 613194e commit bb899dd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ FiniteDifferences.jl estimates derivatives with [finite differences](https://en.
1111

1212
See also the Python package [FDM](https://github.com/wesselb/fdm).
1313

14+
#### FiniteDiff.jl vs FiniteDifferences.jl
15+
[FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl) and [FiniteDifferences.jl](https://github.com/JuliaDiff/FiniteDifferences.jl)
16+
are similar libraries: both calculate approximate derivatives numerically.
17+
You should definately use one or the other, rather than the legacy [Calculus.jl](https://github.com/JuliaMath/Calculus.jl) finite differencing, or reimplementing it yourself.
18+
At some point in the future they might merge, or one might depend on the other.
19+
Right now here are the differences:
20+
21+
- FiniteDifferences.jl supports basically any type, where as FiniteDiff.jl supports only array-ish types
22+
- FiniteDifferences.jl supports higher order approximation
23+
- FiniteDiff.jl is carefully optimized to minimize allocations
24+
- FiniteDiff.jl supports coloring vectors for efficient calculation of sparse Jacobians
25+
1426
## Examples
1527

1628
Compute the first derivative of `sin` with a 5th order central method:

0 commit comments

Comments
 (0)