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.
16 lines (15 loc) • 330 B
JavaScript
module.exports = {
'name': 'norm',
'category': 'Arithmetic',
'syntax': [
'norm(x)',
'norm(x, p)'
],
'description': 'Calculate the norm of a number, vector or matrix.',
'examples': [
'norm([[1, 2], [3, 4]])',
'norm([[1, 2, 3, 4]], 3.5)',
'norm(-4.2)',
'norm([[1, 2], [-3, -4]], \'fro\')'
]
};