ppmpreetham / newton_gregory_interpolation

Input your cool random numbers and then get a function for the same.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Newton-Gregory Interpolation

This is an implementation of Newton-Gregory interpolation method in Rust. Input your cool random numbers and then get a function for that.

Usage

Here, we are inserting the random list of numbers [1, 2, 4, 8, 16, 31] from the famous Dividing a circle into areas question in math.

fn main() {
    let result = newton_gregory_interpolation(vec![1, 2, 4, 8, 16, 31]);
    println!("{}", result);
}

Note: The nC notation in the formula represents the binomial coefficient, which is used in the Newton-Gregory interpolation method

About

Input your cool random numbers and then get a function for the same.


Languages

Language:Rust 100.0%