Skip to content

leesharma/ex_deriv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExDeriv

A basic symbolic differentiation library

Usage

The library takes a polynomial expression in AST form. Currently, only four operations are supported: +, -, /, *.

> import ExDeriv
> derive({:\*, :x, 5}, :x)  # d(5x)/dx = 5
5
> derive({:+, {:-, {:\*, {:/, :x, :y}, 5}, :a}, :b}, :y) # d(5x/y - a + b)/dy
{:\*, 5, {:/, {:\*, -1, :x}, {:\*, :y, :y}}}             #     = -5x/y^2

Installation

If available in Hex, the package can be installed by adding ex_deriv to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_deriv, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_deriv.

Releases

No releases published

Packages

No packages published

Languages