Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.
/ FastForwardDiff.jl Public archive

Fast automatic derivatives of scalar functions in Julia

License

Notifications You must be signed in to change notification settings

gerlero/FastForwardDiff.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastForwardDiff.jl

Stable Dev Build Status Coverage PkgEval Aqua SciML Code Style

Fast and easy derivatives of scalar functions with forward-mode automatic differentiation.

Compared to the scalar differentiation offered by the very popular ForwardDiff.jl package, FastForwardDiff adds:

  • Efficient single-pass value and derivatives with the value_and_derivative and value_and_derivatives functions. Faster and easier than ForwardDiff's equivalent (i.e., the DiffResults API) ✅
  • Unitful.jl support. Correctly handles units in the inputs and outputs of functions ✅

Internally, it relies on the proven dual-number implementation from ForwardDiff.

Example

julia> using FastForwardDiff

julia> f(x) = x^2 + 2x + 1

julia> derivative(f, 3)
8

julia> value_and_derivative(f, 3)
(16, 8)

Documentation

  • STABLE — documentation of the most recent release
  • DEV — documentation of the in-development version

About

Fast automatic derivatives of scalar functions in Julia

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages