Skip to content

bactroid/diffeq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diffeq

Library to differentiate string representations of equations.

I originally started writing this to solve a Codewars kata, but I wanted to keep fleshing it out because the problem intrigued me.

Important Functions

differentiate(equation)

Function takes a string representation of a simple function, differentiates, and returns the result as a string.

All strings are assumed to be an expression set equal to y.

^ is used to represent exponents. For example, '2x^2' represents 2x squared.

differentiateAndEval(equation, value)

Function takes a string representation of a simple function, differentiates, and returns an evaluation of numeric value of y based on the given value for x.

All strings are assumed to be an expression set equal to y.

^ is used to represent exponents. For example, '2x^2' represents 2x squared.

Contribution

Pull requests are always welcome. Code will only be accepted with appropriate unit tests.

About

Library to differentiate string representations of equations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published