Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any (somewhat) advanced mathematics Javascript libraries? [closed]

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.

like image 270
pr1001 Avatar asked May 19 '10 23:05

pr1001


People also ask

Is JavaScript math a library?

Math. js is an extensive math library for JavaScript and Node.

How can I download math in JavaScript?

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.

Is math a library?

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.


2 Answers

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.

like image 94
Charles Avatar answered Sep 19 '22 05:09

Charles


Yes, there is Sylvester, a JavaScript library designed to let you do mathematics with vectors and matrices without having to write lots of loops.

like image 43
luvieere Avatar answered Sep 21 '22 05:09

luvieere