mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
20 lines (18 loc) • 470 B
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>math.js | require.js loading</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.20/require.min.js"></script>
</head>
<body>
<script>
// load math.js using require.js
require(['../../lib/browser/math.js'], function (math) {
// evaluate some expression
const result = math.evaluate('1.2 * (2 + 4.5)')
document.write(result)
})
</script>
</body>
</html>