[https://github.com/HugoGranstrom/numericalnim](https://github.com/HugoGranstrom/numericalnim)
 NumericalNim is a library for doing basic ODE and integration related things. 
At the moment the ODE has two solvers: RK4 and DOPRI54, which are two quite 
standard methods. The integration can at the moment only handle 1D integrals 
and it has the following methods: trapz, simpson, adaptiveSimpson, romberg, 
cumtrapz and cumsimpson. Most of these can integrate both functions and 
discrete data. With the use of generics I hope that you should be able to use 
your own types (arbitrary precision, vectors etc) but they may need to 
implement some procs to be able for example calculate the error between two 
value. NumericalNim does also feature some conviniences like linspace and 
arange procs to create seqs of floats. And it does of course also feature a 
Vector type (can't have enough of those, right?) XD. If you want, you can also 
use Arraymancer Tensors as well which will probably be more performant.

Something I would be very interested in hearing from you is how it performs 
compared to the software you usually use for these tasks (in any programming 
language). I have only tested it on toy projects like integrating sin(x) but it 
would be interesting to see how it performs in some real data.

NumericalNim is my first real project in Nim, which I think is a good language 
with both performance and usability. I'm coming mostly from a Python 
background, so alot of the concepts were new to me for example generics and 
multiple dispatch, both of which are used in my project. I'm no professional in 
neither ODEs nor numerical integration but I have a interest for all kinds of 
numerical methods, so be prepared for the existance of bugs. I'm well aware 
that my implementations are neither the most efficient nor most robust but they 
work for now. I'm planning on improving on them in the future (or if someone 
else wants to contribute).

I'm open to suggestions, improvements and all kinds feedback. If you have any 
questions, don't hestitate :-D

Reply via email to