djru / calculose

A handful of algorithms for estimating antiderivative values.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calculose

The Calculose gem implements two methods for estimating the value of an antiderivative over an interval. The gem implements two methods: Simpsons's Method and Euler's Method. This gem was the product of frustration at the monotonous nature of summing integrals, and the unwieldily interfaces and UXs on most graphing calculators.

Installation

Add this line to your application's Gemfile:

gem 'calculose'

And then execute:

$ bundle

Or install it yourself as:

$ gem install calculose

Usage

Simpson's can be called thusly:

Calculose::Calc.simpson(deltaX, startingX, endingX) do |x| f(x) end

where f(x) is the base function.

Euler's can be called thusly:

Calculose::Calc.euler(deltaX, startingX, startingY, endingX) do |x,y| f(x) end

Note that both x and y are passed to the block by the function.

##To do

  • CLI
  • More algorithms

About

A handful of algorithms for estimating antiderivative values.

License:MIT License


Languages

Language:Ruby 100.0%