## Finding Math Libraries for Your Next JavaScript Project

Finding precisely the JavaScript math library you need can be difficult. In both HTML5 Programming with JavaScript for Dummies and CSS3 for Dummies I define a need to perform math tasks accurately. Both books provide some workarounds for the inaccuracies inherent in performing floating point math. It’s important to remember that some numbers can’t be represented properly in the decimal system used by humans, that there are other numbers the computer can’t represent accurately in decimal, and that there are also error present in converting decimal numbers to binary and vice versa. In short, there are a number of levels at which math errors can occur. Yes, it’s true that the math errors are small, but they become a concern when performing large calculations, some of which can’t suffer any level of error (such as plotting a course to Mars).

The problem is so significant in some cases, that trying to work around the issues becomes an application development task in its own right. It’s for that reason that I started looking for math libraries to perform certain tasks. After all, it’s a lot easier to let someone else do the heavy lifting when it comes to a complex calculation. You can read about the results of some of this research in my article entitled, “Four Serious Math Libraries for JavaScript.” The article not only details the source of many of these errors in great detail, but reviews four libraries you can use to solve them.

The important takeaway I got from the research is that, like many programming tasks, there is no one library that does it all. Each library had something to recommend it. However, each library was sufficiently robust that you shouldn’t need to combine them to create your application. The point is to choose the one library that best meets your needs.

I’m actually looking into a number of library types for use in JavaScript programming. The advantage of JavaScript is that it does provide incredibly strong community support in the form of libraries that you simply use as needed. What sorts of issues do you encounter when writing applications using JavaScript. Let me know what kinds of libraries that you’re having a hard time finding at John@JohnMuellerBooks.com. I’d be more than happy to perform the research for library types that receive enough reader support and report my findings to you.