Are there any libraries knocking around that provide any additional general purpose math functions for Javascript? Say things like sums over a range, derivatives, integrals, etc. I can imagine that many things aren't possible, so even libraries that do rough approximations would be interesting.
Thanks!
Update: As mentioned below, I guess that there aren't any libraries that do what I want to do. In that spirit, I have started on my own library called MathPlus.
Math. js is an extensive math library for JavaScript and Node.
Math. js can be installed using various package managers like npm, or by just downloading the library from the website: https://mathjs.org/download.html.
In computer science, a math library (or maths library) is a component of a programming language's standard library containing functions (or subroutines) for the most common mathematical functions, such as trigonometry and exponentiation.
What are you looking for when you ask for integrals and derivatives? Numerical or symbolic? Indefinite or definite? Single-variable or multivariate? Etc.
It's actually not hard to write a program to do symbolic differentiation, though simplification and display is far from simple (contrary, perhaps, to intuition). Similarly, numerical differentiation and numerical definite integration is simple enough, depending on how much precision you need. (If you need a little it's easy; if you need a fair bit and are doing many operations, you need some serious numerical analysis (math) to make it work; if you need lots of precision you need a bignum library so JS isn't that great.)
'Of course' symbolic integration is extremely difficult in any language. Your best bet in that case would be to query a site like Wolfram|alpha...
If you need clarification or expansion on any of these points, let me know.
Yes, there is Sylvester, a JavaScript library designed to let you do mathematics with vectors and matrices without having to write lots of loops.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With