Expand description
SRMC (Small Rust Math Crate)
srmc is a collection of mathematical methods, functions, and other useful tools. The goal is to make a stand alone math focused crate that can be used for a wide variety of applications.
Will be continuously updated and improved as I imporve with the Rust langauge.
Functions
Creates a vector in numerical order from start to end with steps + 1 elements.
NOTE: Elements of vector should be evenly spaced, but often times last two are not. Working on a fix for it, but if evenly spaced values is vital you may need to remove the final value or choose a different step size.
Function to calculate the percentage error between two values
Function to calculate the relative error between two values
Uses Simpson’s Method to evaluate a definite integral. Function to be integrated must take on parameter of type f32, and return a value of type f32.
See the example functions (sin_x and x_cubed) for examples on how to format input.
Example input function for simpsons for the function sin(x)
Example input function to simpons for the function x cubed