mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.
19 lines (17 loc) • 425 B
HTML
<html>
<head>
<title>math.js | require.js loading</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.11/require.min.js"></script>
</head>
<body>
<script>
// load math.js using require.js
require(['../../dist/math.js'], function (math) {
// evaluate some expression
var result = math.eval('1.2 * (2 + 4.5)');
document.write(result);
});
</script>
</body>
</html>