JavaScript math libraries encapsulate some very specific task. For instance accounting.js makes it easy to convert from a currency to another.